
body,html{
    margin:0;
    padding:0;
    background-color: #F5F1E1;
}

a{
    text-decoration: none;
}

/* Drapeau à damier */
.damier{
    width: 100%;
    height: 1vh;
    background-image:
        repeating-conic-gradient(#000 0% 25%, #fff 0% 50%);
    background-size: 3vh 3vh;
    background-repeat: repeat;
    position: relative;
}



header{
    position: relative;
    padding: 1.5vh 3vh;
}

/* Case à cocher invisible : pilote l'ouverture du menu mobile sans JS */
.menu-toggle{
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Rangée principale du header */
.header-inner{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ---------- Marque : logo rond + titre ---------- */
.marque{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo{
    color:#D9B36C;
    border:dashed #D9B36C;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.titre{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mot{
    color:#F4EDE0;
    font-size: clamp(1.05rem, 2vw, 2rem);   /* 17px → 32px */
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.drapeau{
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 375px;
    margin-top: 4px;
}

/* Les 3 bandes se partagent la largeur disponible */
.bleu,.blanc,.rouge{
    flex: 1 1 0;
    height: 4px;
}
.bleu{  background-color: rgb(0, 85, 164); }
.blanc{ background-color: rgb(255, 255, 255); }
.rouge{ background-color: rgb(239, 65, 53); }

/* ---------- Bouton hamburger (téléphone / tablette) ---------- */
.burger-btn{
    display: none;               /* masqué sur ordinateur */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 12px;
    margin-left: auto;           /* poussé à droite de la marque */
    box-sizing: border-box;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #D9B36C;
    border-radius: 10px;
    cursor: pointer;
}

.burger-btn span{
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background:#D9B36C;
    transition: transform .25s ease, opacity .2s ease;
}

/* ---------- Zone de navigation : liens + actions ---------- */
.header-nav{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 2rem;
    margin-left: 1rem;
}

.milieu{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(1.2rem, 3vw, 3rem);
}

.fin{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

/* Liens de navigation */
.lien{
    text-decoration: none;
    font-size: clamp(1rem, 1.6vw, 1.375rem);   /* 16px → 22px */
    font-weight: 400;
    color:#F4EDE0;
    transition: color .2s ease, transform .2s ease;
}

.lien:hover {
    color:#D9B36C;
    transform: translateY(-3px);
    text-shadow: 0 6px 16px #757c86;
}

/* Bouton "Devenir hôte" (pill) */
.btn-hote{
    text-decoration: none;
    font-size: clamp(1rem, 1.6vw, 1.375rem);
    font-weight: 400;
    color:#D9B36C;
    border:solid 1px #D9B36C;
    border-radius: 999px;
    padding: 1.2vh 2.5vh;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    display: flex;
}

.btn-hote:hover {
    color:#F4EDE0;
    border:solid 1px #F4EDE0;
    transform: translateY(-3px);
    background-color: #2e663f;
    box-shadow: 0 6px 16px #2e663f;
}

/* Bouton connexion rond */
.connexion{
    color:#16321F;
    background-color: #D9B36C;
    border:solid 1px #D9B36C;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    display: flex;
}

.connexion:hover {
    color:#F4EDE0;
    border:solid 1px #F4EDE0;
    transform: translateY(-3px);
    background-color: #2e663f;
    box-shadow: 0 6px 16px #2e663f;
}

/* Avatar + nom d'utilisateur avec lien vers l'espace perso */
.espace-perso{
    text-decoration: none;
    display: flex;
    flex-direction: row;      /* avatar et prénom côte à côte */
    align-items: center;
    gap: 12px;
    border: solid 1px #D9B36C;
    border-radius: 999px;
    padding: 6px 16px 6px 6px;  /* moins à gauche : l'avatar colle au bord */
    white-space: nowrap;
}

.espace-perso:hover {
    color:#F4EDE0;
    border:solid 1px #F4EDE0;
    transform: translateY(-3px);
    background-color: #2e663f;
    box-shadow: 0 6px 16px #2e663f;
}

.espace-perso:hover .avatar {
    color: #F4EDE0;
}

.avatar{
    color: #16321F;
    background-color: #D9B36C;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    flex-shrink: 0;            /* le rond ne s'écrase pas */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;         /* utile plus tard pour la photo */
}

.avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;   /* remplit le rond sans déformer, recadré au centre */
    display: block;
}
.name{
    color: #F4EDE0;
    font-size: 16px;
}

.bandeau{
    position: sticky;
    top:0;
    z-index: 1000;
    background-color: #16321F;
}


/* ===== FOOTER ===== */
.footer{
    display:flex;
    flex-direction: column;
    gap:2rem;
    align-items: center;
    justify-content: center;
    background-color: #16321F;
    color:#757c86;
    height:350px;
}

.lien-footer{
    display:flex;
    flex-direction: row;
    gap: 3rem;
    align-items: right;
}

.centre-footer{
    margin-top:2rem;
    display:flex;
    flex-direction: row;
    justify-content: space-between;  
    align-items: flex-start;
    width: 50%;                      
    gap: 4rem;
}

.lien-site{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap:1rem;
    color: #D9B36C;
}

.lien-site a{
    color:#757c86;
    text-decoration: none;
}

.marque-footer{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0;
}

.trait-footer{
    background-color: #757c86;
    width:50%;
    height:1px;
}

/* ============================================================
   TÉLÉPHONE & TABLETTE PORTRAIT (<= 820px)
   La navigation se replie derrière un bouton hamburger.
   ============================================================ */
@media (max-width: 820px){

    header{
        padding: 1.4vh 4vw;
    }

    .header-inner{
        flex-wrap: wrap;          /* la nav passe sous la marque */
        column-gap: 1.25rem;      /* espace garanti entre la marque et le hamburger */
        row-gap: 0;
        align-items: center;
    }

    .marque{
        flex: 1 1 auto;           /* occupe la place et repousse le hamburger à droite */
        min-width: 0;
        gap: .7rem;
    }

    /* Titre trop long : coupé proprement au lieu de toucher le hamburger */
    .mot{
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Le hamburger devient visible, calé à droite */
    .burger-btn{
        display: flex;
        margin-left: 0;           /* l'espace vient du column-gap ci-dessus */
    }

    /* La navigation : cachée par défaut, dépliée à l'ouverture */
    .header-nav{
        flex: 0 0 100%;           /* pleine largeur -> passe RÉELLEMENT sous la marque */
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        margin-left: 0;
        gap: 1.1rem;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height .32s ease, opacity .25s ease, margin-top .32s ease;
    }

    .milieu{
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    /* Chaque lien devient une ligne pleine largeur, facile à toucher */
    .milieu .lien{
        padding: .9rem .4rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(217,179,108,.22);
    }

    .fin{
        flex-direction: column;
        align-items: stretch;
        gap: .9rem;
        width: 100%;
        padding-top: .4rem;
    }

    .btn-hote{
        justify-content: center;
        font-size: 1.1rem;
        padding: .85rem 1.2rem;
    }

    .espace-perso{
        justify-content: center;
    }

    /* Le bouton connexion rond reste centré (ne s'étire pas) */
    .connexion{
        align-self: center;
    }

    /* --- Ouverture : la case cochée déroule le menu --- */
    .menu-toggle:checked ~ .header-inner .header-nav{
        max-height: 80vh;
        opacity: 1;
        pointer-events: auto;
        margin-top: 1rem;
    }

    /* --- Le hamburger se transforme en croix quand le menu est ouvert --- */
    .menu-toggle:checked ~ .header-inner .burger-btn span:nth-child(1){
        transform: translateY(7px) rotate(45deg);
    }
    .menu-toggle:checked ~ .header-inner .burger-btn span:nth-child(2){
        opacity: 0;
    }
    .menu-toggle:checked ~ .header-inner .burger-btn span:nth-child(3){
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Respect du réglage système « réduire les animations » */
@media (prefers-reduced-motion: reduce){
    .header-nav,
    .burger-btn span,
    .lien,
    .btn-hote,
    .connexion,
    .espace-perso{
        transition: none;
    }
}
