/* ============================================================
   1. VARIABLES ET BASE 
   ============================================================ */
:root {
    --apero: #ff9f43;
    --entree: #1dd1a1;
    --plat: #ff6b6b;
    --dessert: #feca57;
    --autre: #48dbfb;
    --success: #27ae60;
    --dark-blue: rgba(44, 62, 80, 0.95);
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1350&q=80') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    color: #333;
}

/* ============================================================
   2. HEADER & STATS 
   ============================================================ */
.header-info {
    background: var(--dark-blue);
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
#countdown { 
   font-weight: bold;
   color: #feca57;
   font-size: 1.2em; 
   margin-bottom: 10px; 
}

.stats-bar { 
   display: flex;
   justify-content: center; 
   gap: 15px; 
   flex-wrap: wrap; 
   font-size: 0.85em; 
   align-items: center; 
}

.stat-item {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-item b { 
   color: #feca57; 
}

/* --- AJUSTEMENT MOBILE --- */
@media (max-width: 1000px) {
    .header-info {
        /* Sur mobile, il devient "static" : il reste en haut de la page 
           et disparaît quand on descend (scroll) */
        position: static; 
        padding: 10px 5px;
    }

    #countdown {
        font-size: 1em;
        margin-bottom: 5px;
    }

    .stats-bar {
        gap: 8px; /* On resserre les badges sur mobile */
    }

    .stat-item {
        font-size: 0.75em;
        padding: 3px 8px;
    }
}
/* --- STYLE DU BLOC INTRODUCTION --- */
.intro-box {
    max-width: 1260px; /* Aligné sur la largeur max de ton site */
    margin: 20px auto; /* Centré avec de l'espace haut/bas */
    padding: 25px;
    background-color: rgba(255, 255, 224, 0.8); /* Même jaune clair que le formulaire */
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    box-sizing: content-box;
}

.intro-box h1 {
    color: #660503;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2.2em;
}

.intro-box p {
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}



/* ============================================================
   3. LAYOUT PRINCIPAL 
   ============================================================ */
.container {
    display: flex;
    max-width: 1300px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 224, 0.60);
    border-radius: 12px;
    gap: 20px; /* Ajoute de l'espace entre le formulaire et les réponses */
}

.formulaire { 
    flex: 1; 
    padding: 20px; 
    border-right: 1px solid #ddd; 
    position: sticky; 
    top: 140px; 
    height: fit-content; 
}

.reponses { 
    flex: 3; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; /* Force le menu traiteur et les colonnes à s'empiler verticalement */
}

/* ============================================================
   4. FORMULAIRE & INPUTS 
   ============================================================ */
input[type="text"], input[type="number"], textarea {
    padding: 12px;
    margin: 8px 0;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
}

textarea { resize: vertical; min-height: 60px; }

.convives-box {
    background: #fdf2e9;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #e67e22;
}

button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    display: block;
    font-size: 1.1em;
    margin-top: 10px;
}
#btnAjouter { background-color: var(--success); color: white; }
#btnAnnuler { background-color: #95a5a6; color: white; display: none; margin-top: 5px; }

/* ============================================================
   5. CARTES REPAS & CATÉGORIES 
   ============================================================ */
.repas-flex-group, .plat-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.plat-categories { flex-wrap: nowrap; }

.repas-option { cursor: pointer; flex: 1; max-width: 140px; }
.repas-option input { display: none; }

.repas-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease-in-out;
}

.repas-card .emoji { font-size: 1.5em; margin-bottom: 4px; }
.repas-card .label-text { font-size: 0.9em; font-weight: 600; }

.repas-option input:checked + .repas-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.repas-flex-group input:checked + .repas-card { border-color: #ff9f43; background-color: #fff4e6; }
.repas-flex-group input:checked + .repas-card .label-text { color: #e67e22; }

.plat-categories input:checked + .repas-card { border-color: var(--success); background-color: #ebf9f0; }
.plat-categories input:checked + .repas-card .label-text { color: var(--success); }

/* ============================================================
   6. AFFICHAGE DES RÉSULTATS & PRÉSENTS
   ============================================================ */
.colonnes { 
   display: grid;
   /* Par défaut (Mobile) : 1 seule colonne */
   grid-template-columns: 1fr; 
   gap: 15px; 
   width: 100%;
}

/* Tablette (Optionnel) : 2 colonnes */
@media (min-width: 600px) {
    .colonnes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PC (Ecran large) : On force exactement 3 colonnes */
@media (min-width: 1000px) {
    .colonnes {
        grid-template-columns: repeat(3, 1fr);
    }
}

.colonne {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    border-top: 5px solid #ccc; /* La couleur sera surchargée par l'inline style HTML */
    /*height: fit-content;*/
}

.plat-item {
    padding: 10px;
    background: rgba(255, 255, 180, 0.6);
    margin: 8px 0;
    border-radius: 6px;
    box-shadow: 0 4px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.0em;
    border-left: 4px solid var(--success);
}

.badge-present {
    display: inline-block;
    background: #f0f0f0;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 20px;
    font-size: 1.0em;
    border: 1px solid #ddd;
    vertical-align: top;
    height: fit-content;
}

.liste-presents {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: flex-start; /* Alignement haut sur PC */
    gap: 10px;
}

/* ============================================================
   7. LIVRE D'OR (Titre , Messages à gauche)
   ============================================================ */
.liste-presents, .livre-dor-section {
    width: 100%;
    /*max-width: 1260px;*/
    margin: 30px auto !important;
    background: white;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    box-sizing: border-box;
    text-align: left; /* Pour le titre */
}

.livre-dor-section h2 { 
    margin-top: 0;
    position: relative; 
    margin-bottom: 40px; 
    margin: 30px auto !important;
    padding-bottom: 15px; 
    text-align: Center; 
}

.livre-dor-section h2::after {
    content: "";
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100px; height: 3px;
    background: linear-gradient(to right, transparent, #feca57, transparent);
}

#livreDor { 
    margin-top: 15px; 
    display: flex;
    vertical-align: top;
    /*flex-direction: column; */ 
    gap: 15px; 
    text-align: left; /* Aligne le contenu des messages à gauche */
    max-width: 800px;
    margin-left: 20px;
    margin-right: auto;
}

.message-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid var(--feca57);
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* ============================================================
   8. PETITS ÉLÉMENTS & ESPACEMENT
   ============================================================ */
.total-badge { float: right; background: #eee; padding: 2px 8px; border-radius: 10px; font-size: 0.7em; color: #555; }

.btn-action {
    background: none; border: none; cursor: pointer; font-size: 1.1em;
    padding: 2px; width: auto; display: inline-block; transition: transform 0.2s;
}
.btn-action:hover { transform: scale(1.2); }

/* Espacements forcés pour PC et Mobile */
.inscription-repas-box, #champsPlat, .preferences-alimentaires, .liste-presents, .livre-dor-section {
    margin-bottom: 30px !important;
}

.formulaire > div { margin-bottom: 25px; }
.formulaire > div:last-child { margin-bottom: 0; }

/* ============================================================
   9. RESPONSIVE 
   ============================================================ */
@media (max-width: 1000px) {
    .container { flex-direction: column; }
    .formulaire { border-right: none; margin-bottom: 20px; position: static !important; }
}

@media (max-width: 600px) {
    .plat-categories { flex-wrap: wrap; justify-content: center; }
    .plat-categories .repas-option { flex: 0 1 30%; }
}
/* ============================================================
   10. MENU TRAITEUR (Correction)
   ============================================================ */
/* --- STYLE ARDOISE TRAITEUR AMÉLIORÉ --- */
.ardoise-traiteur {
    background: #1e1e1e; /* Fond tableau noir */
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 80%);
    color: #fdfdfd;
    padding: 20px 30px;
    border-radius: 12px;
    border: 10px solid #4e342e; /* Cadre bois plus sombre */
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 50px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    font-family: 'Segoe UI', cursive; /* Tu peux mettre 'Brush Script MT' si tu l'as */
    text-align: center; /* Centrage global */
    width: auto; /*100%;*/
    box-sizing: border-box;
}

.ardoise-traiteur h3 {
    font-size: 1.5em;
    color: #feca57;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(254, 202, 87, 0.4);
    display: inline-block;
    padding-bottom: 10px;
}

/* --- BLOCS PLATS --- */
.ardoise-item {
    padding: 10px 0; /* Espace équilibré haut/bas */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative; /* Pour positionner le trait par rapport à l'item */
}
.ardoise-cat {
    color: #48dbfb;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px; /* Espace sous la catégorie */
    opacity: 0.8;
}

.ardoise-plat {
    font-size: 1.2em; /* PLATS ÉCRITS EN GROS */
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Plus d'impact */
}
/*
// LA LIGNE DE SÉPARATION (Style craie fine)
.ardoise-item:not(:last-child):after {
    content: ""; // On enlève les "~~~"
    position: absolute;
    bottom: 0;
    left: 20%; // Centre la ligne qui fait 60% de large 
    right: 20%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
}*/
/* ============================================================
   11. HARMONISATION FINALE & FOOTER OPAQUE
   ============================================================ */

/* Harmonisation des cadres du bas avec le formulaire */
.container-section {
    width: 95%;
    max-width: 1260px;
    margin: 30px auto !important;
    background-color: rgba(255, 255, 224, 0.8) !important; /* Même jaune que le formulaire */
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
    box-sizing: border-box;
}

.section-title-box {
    background-color: rgba(255, 255, 224, 0.7);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.section-title-box h2 {
    color: #660503;
    margin: 0;
}

/* LE BANDEAU NOIR OPAQUE */
.site-footer {
    background-color: #000000 !important; /* Noir total */
    color: #ffffff !important;
    padding: 40px 0;
    text-align: center;
    width: 100%;
    margin-top: 50px;
    border-top: 4px solid #feca57; /* Ligne dorée de finition */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 100;
}

.site-footer p {
    margin: 0;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9em;
}
/* Empêche l'image de fond de dépasser sous le noir 
html, body {
    margin: 0;
    padding: 0;
    height: auto;
}*/
