/* ------------------ POLICE ------------------ */
@font-face {
    font-family: 'Police';
    src: url('police.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ------------------ BODY ------------------ */
body {
    margin: 0;
    padding: 0;
    font-family: 'Police', cursive;
    background-image: url('img3.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* ------------------ IMAGE LOGO ------------------ */
img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 200px;
}

/* ------------------ NAVIGATION ------------------ */
nav {
    background-color: #215e99;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    padding: 0;
    margin: 0;
    height: 50px;
    align-items: center;
}

nav ul li a {
    color: #fff5e3;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;      /* centrage vertical */
    justify-content: center;  /* centrage horizontal */
    padding: 8px 16px;
    border-right: 2px solid #daceb6;
    height: 100%;
}

nav ul li:last-child a {
    border-right: none;
}

/* ------------------ TITRES ------------------ */
h1, h2, h3 {
    font-family: 'Police', cursive;
}

h1 {
    color: #215e99;
}

h2, h3 {
    color: #623a31;
}

.special, span.italique {
    font-style: italic;
}

span.gras {
    font-weight: bold;
}

/* ------------------ PARAGRAPHES ------------------ */
p {
    text-align: justify;
    font-size: 1.3em;
    line-height: 1.6;
    font-family: 'Police', cursive;
    max-width: 900px;
}

/* ------------------ LISTES ------------------ */
ul {
    font-family: 'Police', cursive;
    font-size: 1.3em;
    line-height: 1.6;
}

/* ------------------ TARIFS ET CONTENEURS ------------------ */
.tarifs {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.tarifs > div {
    flex: 1;
    background-color: transparent;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ------------------ TEXTE GAUCHE / FILIGRANE ------------------ */
.texte-gauche {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.page-filigrane .texte-gauche::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img2.png');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.texte-gauche h1, .texte-gauche p, .texte-gauche span {
    position: relative;
    z-index: 1;
}

/* ------------------ FOOTER ------------------ */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #623a31;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #452822;
    text-decoration: underline;
}

.footer-infos {
    border-top: 1px solid rgba(98, 58, 49, 0.3);
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
}

.footer-infos span {
    color: #623a31;
    font-weight: bold;
}
.footer-logo {
    display: block;
    margin: 0 auto 15px;  /* centre et ajoute un espace en dessous */
    width: 150px;          /* ajuste selon tes besoins */
}

/* ------------------ DETAILS / SUMMARY ------------------ */
details summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 1px solid #d68e60;
    color: #623a31;
    font-weight: bold;
    font-size: 1.5em;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    font-size: 3em;
    color: #d68e60;
    font-weight: bold;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
    animation: apparitionDouce 0.5s;
}

@keyframes apparitionDouce {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------ BOUTON CONTACT FLOTTANT ------------------ */
.btn-contact {
    /* Plus de position fixed ici, c'est le parent qui gère ! */
    padding: 10px 18px;
    border: 2px solid #623a31;
    background-color: transparent;
    color: #623a31;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.3s ease;
    white-space: nowrap; /* Empêche le texte de se couper si l'écran est petit */
}

.btn-contact:hover {
    background-color: #623a31;
    color: #fff;
    cursor: pointer;
}

/* ------------------ BOUTON INLINE DANS DETAILS ------------------ */
/* Masquer par défaut */
details .btn-contact-inline {
    display: none;
}

/* Afficher et centrer horizontalement quand details ouvert */
details[open] .btn-contact-inline {
    display: block;
    margin: 20px auto 0; /* centre horizontalement et ajoute un petit espace en haut */
    text-align: center;  /* centre le texte à l’intérieur */
    padding: 8px 20px;
    border: 2px solid #623a31;
    background-color: transparent;
    color: #623a31;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

details[open] .btn-contact-inline:hover {
    background-color: #623a31;
    color: #fff;
    cursor: pointer;
}

/* ------------------ AUTRES STYLES ------------------ */
.legal {
    padding: 40px;
    text-align: justify;
    border-radius: 8px;
    max-width: 900px;
    margin: 40px auto;
    background-color: transparent;
    hyphens: auto;
}

.element {
    width: 30%;
}

.rendezvous-container {
    display: flex;
    gap: 20px;
    max-width: 85%;
    margin: 20px auto;
    padding: 20px;
}

.texte-gauche {
    flex: 0 0 80%;
    position: relative;
    padding: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.calendrier-droite {
    position: fixed;          /* C'est lui qui fixe la position sur l'écran */
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;   /* Empile verticalement ce qu'il y a dedans */
    align-items: center;      /* Centre les éléments (image et bouton) */
    z-index: 1000;
    margin-right: 30px;
}

.calendrier-droite img {
    width: 190px;
    height: auto;
    border-radius: 15px;
    display: block;
    margin-top: 15px;      /* L'espace entre l'image et le bouton */

}

/* ------------------ BOUTON RETOUR HAUT ------------------ */
#btn-retour-haut {
    display: none; /* Géré par le Javascript */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;

    /* Le rond */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    /* Style : Fond transparent et bordure fine marron */
    background-color: transparent;
    border: 2px solid #623a31;
    color: #623a31; /* Couleur qui sera utilisée pour la flèche */

    cursor: pointer;
    box-shadow: 0 2px 5px rgba(98, 58, 49, 0.1);
    transition: all 0.3s ease;
}

/* DESSIN DE LA FLÈCHE (Méthode Absolue) */
#btn-retour-haut::before {
    content: '';
    position: absolute;
    
    /* On place le carré au centre du bouton */
    top: 50%;
    left: 50%;
    
    /* Taille de la flèche */
    width: 12px;
    height: 12px;
    
    /* On dessine les traits fins (1.5px) en haut et à gauche */
    border-top: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    
    /* 1. translate(-50%, -30%) : On centre l'élément et on le remonte un tout petit peu 
          pour qu'il paraisse bien au milieu visuellement.
       2. rotate(45deg) : On tourne le carré pour que la pointe aille vers le haut.
    */
    transform: translate(-50%, -30%) rotate(45deg);
}

/* EFFET DE SURVOL */
#btn-retour-haut:hover {
    background-color: #623a31; /* Fond marron */
    color: #fff; /* La flèche devient blanche */
    transform: translateY(-5px); /* Petit rebond */
}
/* Titre au dessus des blocs */
.titre-choix {
    text-align: center;
    font-weight: bold;
    color: #623a31;
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* Le conteneur qui met les deux blocs côte à côte */
.choix-motif-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

/* On cache le vrai bouton radio (le petit rond) */
.choix-motif-container input[type="radio"] {
    display: none;
}

/* Le style des cartes (Labels) */
.carte-choix {
    flex: 1; /* Ils prennent la même largeur */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    border: 2px solid #daceb6; /* Bordure beige par défaut */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #623a31;
}

.carte-choix .icone {
    font-size: 30px;
    margin-bottom: 10px;
}

.carte-choix .titre {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

/* EFFET QUAND ON PASSE LA SOURIS */
.carte-choix:hover {
    border-color: #623a31;
    background-color: #fcf8f2;
}

/* EFFET QUAND UNE OPTION EST SÉLECTIONNÉE (C'est là la magie) */
.choix-motif-container input[type="radio"]:checked + label {
    background-color: #623a31; /* Devient marron */
    border-color: #623a31;
    color: #fff; /* Texte blanc */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(98, 58, 49, 0.3);
}


/* =======================================================
   VERSION MOBILE (CORRIGÉE - CONTACT & TEXTE)
   ======================================================= */
@media screen and (max-width: 900px) {

    /* 1. FOND D'ÉCRAN & BASES */
    body {
        background-attachment: scroll;
        background-size: auto;
        background-repeat: repeat;
        background-position: top left;
        overflow-x: hidden; /* Empêche le défilement horizontal */
    }

    /* 2. MENU DÉFILANT (Reste inchangé car c'était bien) */
    nav ul {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0;
        height: 60px;
        -webkit-overflow-scrolling: touch;
    }
    nav ul li { flex: 0 0 auto; }
    nav ul li a {
        font-size: 16px;
        padding: 0 15px;
        border-right: 1px solid rgba(255,255,255,0.3);
        height: 60px;
        display: flex;
        align-items: center;
    }

    /* 3. STRUCTURE DES PAGES (Qui suis-je + Contact) */
    /* On applique la mise en colonne aux deux types de conteneurs */
    .rendezvous-container, 
    .tarifs {
        display: flex;       /* On force le flex */
        flex-direction: column; /* MAIS en colonne (l'un sous l'autre) */
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* 4. BLOCS DE TEXTE (Pour qu'ils ne touchent pas les bords) */
    /* On cible le texte de gauche ET les div dans la page tarifs */
    .texte-gauche, 
    .tarifs > div {
        width: auto;
        flex: none; /* Annule les tailles fixes */
        margin: 10px 20px 20px 20px; /* Marges : Haut Droite Bas Gauche */
        padding: 0;
    }

    /* 5. HARMONISATION DES POLICES (Listes et Paragraphes identiques) */
    p, ul, li {
        font-size: 16px;      /* Tout le monde à la même taille */
        text-align: left;     /* Alignement gauche pour lecture facile */
        line-height: 1.5;     /* Espacement des lignes confortable */
    }
    
    /* Correction spécifique pour les puces des listes */
    ul {
        padding-left: 20px;   /* Pour voir les puces */
        margin-top: 10px;
    }

    /* 6. PHOTO ET BOUTON FLOTTANT (Page Qui suis-je) */
    .calendrier-droite {
        position: static !important;
        transform: none !important;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        width: 100%;
        margin: 0 0 40px 0;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .calendrier-droite img {
        max-width: 200px;
        height: auto;
        margin-bottom: 20px;
        margin-top: 0;
    }

    /* 7. BOUTON TRANSPARENT (Correction demandée) */
    .btn-contact {
        width: 100%;
        max-width: 300px;
        text-align: center;
        /* On remet la transparence et on s'assure que la bordure reste */
        background-color: transparent; 
        border: 2px solid #623a31;
        color: #623a31;
    }
    
    /* Optionnel : Ajout d'un fond au survol sur mobile aussi pour confirmer le clic */
    .btn-contact:active {
        background-color: rgba(98, 58, 49, 0.1);
    }
}