/* =====================================================================
   Page Réservation : calendrier client simplifié et responsive
   (mêmes couleurs que le site : brun #a2631d, crème #fde8d1, vert #9acc8b)
   ===================================================================== */
.resa, .resa-merci-fond {
    --resa-brun: #a2631d;
    --resa-brun-fonce: #7a4612;
    --resa-creme: #fde8d1;
}
.resa {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 6px solid var(--resa-brun);
    border-radius: 16px;
    overflow: hidden;
    color: #3b2a1a;
    font-family: "Poppins", system-ui, sans-serif;
    box-shadow: 0 18px 40px rgba(80, 40, 0, .18);
}
.resa *, .resa *::before, .resa *::after { box-sizing: border-box; }
.resa p { text-align: left; }

/* Champ piège anti-robot : invisible pour les visiteurs */
.champ-piege { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Étapes */
.resa-etapes { display: flex; margin: 0; padding: 0; list-style: none; background: var(--resa-brun); }
.resa-etapes li {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem .5rem; color: rgba(255, 255, 255, .7); font-weight: 600; font-size: .95rem;
}
.resa-etapes li span {
    display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    border: 2px solid currentColor; font-size: .85rem;
}
.resa-etapes li.actif { color: #fff; background: var(--resa-brun-fonce); }

.resa-etape { padding: 1rem; }
.resa-etape[hidden] { display: none; }

/* Calendrier */
.resa-calendrier { background: var(--resa-creme); border-radius: 12px; overflow: hidden; }
.resa-cal-entete { display: flex; align-items: center; justify-content: space-between; background: var(--resa-brun); color: #fff; }
.resa .resa-mois { margin: 0; color: #fff !important; font-size: 1.35rem !important; font-weight: 600; text-transform: capitalize; text-align: center; }
.resa-nav {
    width: 52px; height: 52px; border: 0; background: transparent; color: #fff; font-size: 2rem; line-height: 1;
    cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.resa-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.resa-nav:disabled { opacity: .35; cursor: default; }
.resa-jours-semaine, .resa-grille { display: grid; grid-template-columns: repeat(7, 1fr); }
.resa-jours-semaine span { padding: .5rem 0; text-align: center; font-weight: 600; color: var(--resa-brun); font-size: .9rem; }
.resa-grille { gap: 4px; padding: 4px 6px 8px; }
.resa-jour {
    aspect-ratio: 1 / 1; min-height: 40px; display: grid; place-items: center;
    border: 0; border-radius: 10px; background: #fff; color: #3b2a1a;
    font: 600 1.05rem/1 "Poppins", system-ui, sans-serif; cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
@media (hover: hover) {
    .resa-jour:not(.debut):not(.fin):not(.dans-sejour):hover:not(:disabled) { background: #ffd9ad; transform: translateY(-1px); }
}
.resa-jour:focus-visible { outline: 3px solid var(--resa-brun); outline-offset: 1px; }
.resa-jour:disabled { background: transparent; color: #c9b39b; cursor: default; text-decoration: line-through; }
.resa-jour.vide { visibility: hidden; }
.resa-jour.aujourdhui { box-shadow: inset 0 0 0 2px var(--resa-brun); }
.resa-jour.dans-sejour { background: #d4ecc8; color: #2d5a1b; border-radius: 6px; }
.resa-jour.debut, .resa-jour.fin { background: #5e9e45; color: #fff; }
.resa-jour.debut { border-radius: 10px 4px 4px 10px; }
.resa-jour.fin { border-radius: 4px 10px 10px 4px; }
.resa-jour.debut.fin { border-radius: 10px; }

@media (min-width: 601px) {
    .resa-jour { aspect-ratio: auto; height: 54px; }
}

/* Résumé des dates */
.resa-resume { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; margin-top: 1rem; }
.resa-resume > div { background: var(--resa-creme); border-radius: 10px; padding: .55rem .75rem; min-width: 0; }
.resa-resume span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--resa-brun); font-weight: 600; }
.resa-resume strong { display: block; font-size: .98rem; color: #3b2a1a; overflow-wrap: anywhere; }
.resa .resa-aide { margin: .75rem 0 0; color: #7b6450 !important; font-size: .9rem !important; }

/* Boutons */
.resa-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.resa-bouton {
    min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid var(--resa-brun);
    font: 600 1rem "Poppins", system-ui, sans-serif; cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.resa-bouton.principal { background: var(--resa-brun); color: #fff; box-shadow: 0 6px 16px rgba(162, 99, 29, .3); }
.resa-bouton.principal:hover:not(:disabled) { background: var(--resa-brun-fonce); transform: translateY(-2px); }
.resa-bouton.secondaire { background: #fff; color: var(--resa-brun); }
.resa-bouton:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.resa-bouton.large { width: 100%; }
.resa-bouton.envoi { position: relative; color: transparent !important; }
.resa-bouton.envoi::after {
    content: ''; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
    border: 3px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%;
    animation: resa-tourne .7s linear infinite;
}
@keyframes resa-tourne { to { transform: rotate(360deg); } }
.resa-lien { background: none; border: 0; padding: 0; color: var(--resa-brun); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Étape 2 : formulaire */
.resa .resa-rappel {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center;
    margin: 0 0 1rem; padding: .7rem .9rem; background: var(--resa-creme); border-radius: 10px;
    color: #3b2a1a !important; font-size: .95rem !important;
}
.resa-champs { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.resa-champ { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .95rem; color: #3b2a1a; }
.resa-champ.large { grid-column: 1 / -1; }
.resa-champ small { font-weight: 400; color: #7b6450; }
.resa-champ input, .resa-champ select, .resa-champ textarea {
    width: 100%; min-height: 48px; padding: .6rem .8rem; border: 2px solid #e6d2bd; border-radius: 10px;
    background: #fffdfa; color: #3b2a1a; font: 400 1rem "Poppins", system-ui, sans-serif;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.resa-champ textarea { resize: vertical; min-height: 110px; }
.resa-champ input:focus, .resa-champ select:focus, .resa-champ textarea:focus {
    outline: none; border-color: var(--resa-brun); box-shadow: 0 0 0 4px rgba(162, 99, 29, .15);
}
.resa-champ .invalide { border-color: #c0392b; background: #fff5f4; }
.resa-erreur { color: #b42318; font-size: .88rem; font-weight: 600; min-height: 0; }
.resa .resa-erreur { margin: .5rem 0 0; }
.resa .resa-erreur:empty { display: none; }
.resa-erreur-globale { padding: .7rem .9rem; background: #fde8e6; border-radius: 10px; }
.resa .resa-mention { margin: .75rem 0 0; color: #7b6450 !important; font-size: .82rem !important; }
.resa .resa-recaptcha { justify-content: center; margin-top: .75rem; color: #7b6450; font-size: .8rem; }

/* Animation douce au changement d'étape */
.resa-etape:not([hidden]) { animation: resa-apparition .35s ease both; }
@keyframes resa-apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Fenêtre de remerciement */
.resa-merci-fond {
    position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 1rem;
    background: rgba(30, 18, 6, .55); animation: resa-apparition .25s ease both;
}
.resa-merci {
    position: relative; width: min(520px, 100%); padding: 2rem 1.5rem 1.5rem; border-radius: 18px; background: #fff;
    text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); font-family: "Poppins", system-ui, sans-serif;
}
.resa-merci h2 { margin: .5rem 0; color: #4e7d2a; font-size: 2rem; }
.resa-merci p { margin: .4rem 0; color: #3b2a1a; font-size: 1rem; line-height: 1.5; }
.resa-merci .icone { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e3f3e9; color: #2f7d4f; font-size: 2rem; }
.resa-merci button { margin-top: 1rem; }

@media (max-width: 600px) {
    #contenu_card.sec { padding-left: 12px; padding-right: 12px; }
    .resa { border-width: 4px; border-radius: 12px; }
    .resa-etape { padding: .75rem; }
    .resa-etapes li { font-size: .85rem; }
    .resa-grille { gap: 3px; padding: 3px 4px 6px; }
    .resa-jour { font-size: .95rem; border-radius: 8px; min-height: 36px; }
    .resa-jours-semaine span { font-size: .78rem; }
    .resa-resume { grid-template-columns: 1fr 1fr; }
    .resa-resume > div:last-child { grid-column: 1 / -1; }
    .resa-champ:not(.demi) { grid-column: 1 / -1; }
    .resa-actions { flex-direction: column-reverse; }
    .resa-actions .resa-bouton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .resa *, .resa-merci-fond { animation: none !important; transition: none !important; }
}

/* Bandeau de confiance + WhatsApp */
.resa-confiance {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
    margin: 1rem 1rem 0; padding: .85rem 1rem; border-radius: 12px;
    background: #f1f8ec; border: 1px solid #cfe6c2;
}
.resa .resa-confiance p { margin: 0; flex: 1 1 260px; color: #2d4a1f !important; font-size: .95rem !important; line-height: 1.45; }
.resa-whatsapp {
    display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px;
    background: #0e7a3e; color: #fff !important; text-decoration: none; font-size: .92rem; line-height: 1.2;
    transition: transform .15s ease, box-shadow .15s ease;
}
.resa-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(14, 122, 62, .35); }
.resa-whatsapp .icone-whatsapp { flex: 0 0 auto; }
.resa-merci .resa-whatsapp { margin-top: .75rem; justify-content: center; }
.resa-merci .resa-detail { background: #fdf3e7; border-radius: 10px; padding: .6rem .8rem; }
@media (max-width: 600px) {
    .resa-confiance { margin: .75rem .75rem 0; }
    .resa-whatsapp { width: 100%; justify-content: center; }
}

/* Titre de la page (la page n'a plus de grande image : le calendrier est visible tout de suite) */
.sec .titre-page {
    margin: 0 0 18px; padding-top: 12px; text-align: center; color: #fff;
    font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.15;
}
.sec .titre-page span { display: block; margin-top: 10px; font-size: clamp(.95rem, 3.2vw, 1.15rem); font-weight: 500; opacity: .95; }

/* Choix de la chambre (étape 1) */
.resa-choix-chambre { margin-bottom: 1rem; }
.resa-lien-tarifs { align-self: flex-start; color: var(--resa-brun); font-size: .88rem; font-weight: 500; text-decoration: underline; }

/* Infos pratiques sous le formulaire */
.resa-infos { padding: 50px 16px; background: #fff; font-family: "Poppins", system-ui, sans-serif; }
.resa-infos h2 { margin: 0 0 24px; text-align: center; color: #a2631d; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.resa-infos-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.resa-info { padding: 20px 22px; border-radius: 16px; background: #fdf3e7; color: #3b2a1a; }
.resa-info h3 { margin: 0 0 8px; font-size: 1.1rem; color: #7a4612; }
.resa-info p { margin: 0 0 10px; font-size: .97rem; line-height: 1.55; text-align: left; }
.resa-info a { color: #7a4612; font-weight: 600; }
.resa-info-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* L'en-tête du site est posé par-dessus la page : on lui réserve sa place */
.espace-entete { height: 150px; background: #e7a45c; }
.resa a.resa-lien-tarifs, .resa-info a { color: #7a4612; }

/* Le style général du site met tous les paragraphes en blanc (.sec p) : on rétablit
   des couleurs lisibles à l'intérieur du formulaire, en particulier pour les erreurs */
.resa p { color: #3b2a1a; }
.resa .resa-erreur, .resa p.resa-erreur { color: #9f1c12 !important; font-size: .95rem !important; text-align: left; }
.resa .resa-erreur-globale { background: #fde8e6; border: 1px solid #f3b8b1; line-height: 1.5; }
.resa .resa-erreur-globale .resa-whatsapp { margin-top: .6rem; }

/* Fenêtre de confirmation ouverte : la page derrière ne défile plus (classe posée par main-reservation.js) */
.body-overflow-hidden { overflow: hidden; }
