/* ==========================================================================
   STYLE SCOLAIRE & LUDIQUE - TABLEAU NOIR, POST-ITS & CAHIER D'ÉCOLIER
   Fichier : assets/css/style.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&family=Patrick+Hand&display=swap');

:root {
    --chalk-board: #1c2e26;
    --chalk-board-dark: #122019;
    --wood-frame: #8b5a2b;
    --wood-dark: #5c3a1e;
    --chalk-white: #fdfbf7;
    --chalk-yellow: #fde047;
    --chalk-pink: #f472b6;
    --chalk-blue: #67e8f9;
    --chalk-green: #86efac;
    
    /* Couleurs Post-its & Gommettes */
    --postit-yellow: #fef08a;
    --postit-pink: #fbcfe8;
    --postit-blue: #bae6fd;
    --postit-green: #bbf7d0;
    --postit-orange: #fed7aa;
    
    --ink-blue: #1e3a8a;
    --ink-dark: #1f2937;
    --pencil-lead: #374151;
    
    --font-chalk: 'Caveat', cursive;
    --font-hand: 'Patrick Hand', cursive;
    --font-title: 'Fredoka', cursive, sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    --shadow-paper: 0 4px 15px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background-color: #243b30;
    background-image: 
        radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(180deg, #182820 0%, #22372c 50%, #16241d 100%);
    background-size: 24px 24px, 100% 100%;
    color: var(--chalk-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   EN-TÊTE : CADRE EN BOIS & CRAIES
   ========================================================================== */
.main-header {
    background: #fff;
    border-bottom: 6px solid #f59e0b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: #f59e0b;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 5px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
.lang-selector {
    display: flex;
    gap: 6px;
}
.lang-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.lang-link.active, .lang-link:hover {
    background: rgba(0,0,0,0.4);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink-dark);
}
.logo-icon {
    font-size: 2.4rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.logo-text strong {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: #d97706;
    display: block;
    line-height: 1.1;
}
.logo-text small {
    font-family: var(--font-hand);
    color: #4b5563;
    font-size: 1.1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 12px;
    align-items: center;
}
.nav-menu a {
    text-decoration: none;
    color: var(--pencil-lead);
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.2s ease;
    background: #f3f4f6;
    border: 2px solid transparent;
}
.nav-menu a:hover {
    background: #fef08a;
    color: #854d0e;
    border-color: #facc15;
}
.btn-admin-nav {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border: 2px dashed #818cf8 !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    width: 28px;
    height: 4px;
    background: #d97706;
    border-radius: 4px;
}

/* ==========================================================================
   TABLEAU NOIR HERO AVEC CRAIE
   ========================================================================== */
.hero-chalkboard {
    margin: 30px auto 40px;
    background: #192720;
    border: 14px solid #8b5a2b;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 
        inset 0 0 60px rgba(0,0,0,0.8),
        0 10px 30px rgba(0,0,0,0.5),
        0 0 0 2px #5c3a1e;
    position: relative;
    text-align: center;
}

.chalk-badge {
    display: inline-block;
    font-family: var(--font-chalk);
    font-size: 1.6rem;
    color: var(--chalk-yellow);
    border: 2px dashed var(--chalk-yellow);
    padding: 2px 18px;
    border-radius: 30px;
    margin-bottom: 12px;
}

.hero-chalkboard h1 {
    font-family: var(--font-chalk);
    font-size: 3rem;
    color: var(--chalk-white);
    letter-spacing: 1px;
    text-shadow: 0 0 4px rgba(255,255,255,0.4);
    margin-bottom: 10px;
}

.hero-lead {
    font-family: var(--font-hand);
    font-size: 1.6rem;
    color: var(--chalk-blue);
    max-width: 750px;
    margin: 0 auto 25px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==========================================================================
   BOUTONS STICKERS & GOMMETTES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-family: var(--font-title);
    font-size: 1.05rem;
    text-decoration: none;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: all 0.15s ease;
}
.btn:active {
    transform: translateY(2px);
}

.btn-primary { background: #ec4899; color: #fff; }
.btn-primary:hover { background: #db2777; }

.btn-secondary { background: #facc15; color: #713f12; }
.btn-secondary:hover { background: #eab308; }

.btn-sm { padding: 8px 16px; font-size: 0.95rem; }
.btn-light { background: #f1f5f9; color: #1e293b; }
.btn-back {
    display: inline-block;
    background: #fef08a;
    color: #854d0e;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-title);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 700;
}

/* ==========================================================================
   FEUILLES DE CAHIER & POST-ITS (CONTENUS)
   ========================================================================== */
.notebook-sheet, .page-container .section-card, .article-detail, .password-box {
    background-color: #ffffff;
    border-radius: 8px;
    color: #1f2937;
    padding: 30px 35px;
    box-shadow: var(--shadow-paper);
    position: relative;
    margin-bottom: 35px;
    border-left: 6px solid #ef4444;
}

.page-title-box { text-align: center; margin: 25px 0 35px; }
.page-title-box h1 {
    font-family: var(--font-chalk);
    font-size: 2.8rem;
    color: var(--chalk-yellow);
    text-shadow: 0 0 5px rgba(253, 224, 71, 0.4);
}
.page-title-box p {
    font-family: var(--font-hand);
    font-size: 1.4rem;
    color: var(--chalk-blue);
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--ink-blue);
    margin-bottom: 5px;
}
.section-header .subtitle {
    font-family: var(--font-hand);
    font-size: 1.35rem;
    color: #6b7280;
}
.content-body {
    font-size: 1.1rem;
    line-height: 1.75;
    margin-top: 15px;
}
.content-body p { margin-bottom: 12px; }

/* ==========================================================================
   GRILLE POST-ITS : ÉVÉNEMENTS & ACTUALITÉS
   ========================================================================== */
.school-grid-two, .home-two-cols, .adhesion-grid, .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.postit-card {
    border-radius: 6px;
    padding: 25px 30px;
    color: #1f2937;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    position: relative;
}

.pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.postit-yellow { background: var(--postit-yellow); }
.postit-blue { background: var(--postit-blue); }
.postit-pink { background: var(--postit-pink); }
.postit-green { background: var(--postit-green); }

.postit-card h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 2px dashed rgba(0,0,0,0.15);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.postit-card h2 a {
    font-size: 0.95rem;
    text-decoration: none;
    color: #2563eb;
    font-family: var(--font-body);
}

.event-sticky-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dotted rgba(0,0,0,0.15);
}
.event-sticky-item:last-child { border-bottom: none; margin-bottom: 0; }

.event-stamp {
    background: #ef4444;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
    font-family: var(--font-title);
    min-width: 48px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.event-stamp .day { font-size: 1.2rem; font-weight: 700; display: block; line-height: 1; }
.event-stamp .month { font-size: 0.75rem; text-transform: uppercase; }

.event-details-mini h3 { font-family: var(--font-title); font-size: 1.1rem; color: #1e3a8a; }
.event-details-mini p { font-size: 0.95rem; color: #4b5563; }

.news-sticky-item {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dotted rgba(0,0,0,0.15);
}
.news-sticky-item:last-child { border-bottom: none; }
.news-sticky-item h3 { font-family: var(--font-title); font-size: 1.15rem; }
.news-sticky-item a { color: #1e3a8a; text-decoration: none; }
.news-sticky-item a:hover { text-decoration: underline; }
.news-sticky-item .date { font-family: var(--font-hand); font-size: 1.1rem; color: #6b7280; }

/* ==========================================================================
   ACTUALITÉS & ÉVÉNEMENTS (PAGES DÉDIÉES)
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: #1f2937;
    box-shadow: var(--shadow-paper);
    display: flex;
    flex-direction: column;
}
.news-card-img img { width: 100%; height: 180px; object-fit: cover; }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-body h2 { font-family: var(--font-title); font-size: 1.3rem; color: var(--ink-blue); margin: 8px 0; }
.news-card-body .btn-read { margin-top: auto; color: #d97706; font-weight: 700; text-decoration: none; }

.events-full-list { display: flex; flex-direction: column; gap: 20px; }
.event-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    color: #1f2937;
    box-shadow: var(--shadow-paper);
    display: flex;
    gap: 20px;
    align-items: center;
}
.event-date-large {
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    min-width: 80px;
    max-width: 80px;
}
.event-date-large .day { font-size: 1.8rem; font-weight: 800; display: block; line-height: 1; }
.event-date-large .month { font-size: 0.85rem; text-transform: uppercase; }
.event-details h2 { font-family: var(--font-title); font-size: 1.3rem; color: #1e3a8a; }

/* ==========================================================================
   PHOTOTHÈQUE : CADRES POLAROIDS PARFAITEMENT DÉLIMITÉS ET PROPRES
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.gallery-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px 15px 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    text-align: center;
    color: #1f2937;
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* Empêche tout débordement d'image */
}

/* Boîte conteneur de la photo de couverture */
.polaroid-img-box {
    width: 100%;
    height: 190px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
}

.polaroid-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card h2 {
    font-family: var(--font-chalk);
    font-size: 1.7rem;
    color: #1e3a8a;
    margin: 4px 0 6px;
    line-height: 1.2;
}

.photo-count {
    font-family: var(--font-hand);
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 6px;
}

/* Grille des photos dans un album */
.photos-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.photo-item {
    background: #ffffff;
    padding: 10px 10px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-align: center;
    overflow: hidden;
}

.photo-item a {
    display: block;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    border-radius: 4px;
}

.photo-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.photo-item img:hover {
    transform: scale(1.04);
}

/* ==========================================================================
   ALERTS & FORMULAIRES
   ========================================================================== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-family: var(--font-title);
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #1e3a8a;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.05rem;
    background: #f8fafc;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: #f59e0b;
    outline: none;
    background: #fff;
}

.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-family: var(--font-title);
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.alert-success { background: #bbf7d0; color: #14532d; border: 2px solid #86efac; }
.alert-error { background: #fecaca; color: #7f1d1d; border: 2px solid #f87171; }

.iban-box {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #94a3b8;
    margin: 15px 0;
}
.price-tag {
    font-size: 1.4rem;
    color: #d97706;
    font-family: var(--font-title);
}

/* ==========================================================================
   PIED DE PAGE
   ========================================================================== */
.main-footer {
    background: #111d17;
    border-top: 8px solid #8b5a2b;
    color: #cbd5e1;
    padding-top: 40px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
}
.footer-col h3 {
    font-family: var(--font-title);
    color: var(--chalk-yellow);
    font-size: 1.35rem;
    margin-bottom: 15px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 1rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    background: #09100c;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-link { color: #64748b; text-decoration: none; }
.admin-link:hover { color: #fde047; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 820px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }
    .nav-menu.active { display: flex; }
    .school-grid-two, .home-two-cols, .adhesion-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .hero-chalkboard h1 { font-size: 2.2rem; }
}
