/* ==========================================================================
   Calendar.Christmas - feuille de style principale
   Reprend fidèlement l'apparence du site de 2021-2025 (gabarit Crism,
   html.design) avec des sélecteurs sémantiques. Les valeurs sont celles
   du style.css archivé ; seules les règles mortes ont été retirées.
   ========================================================================== */

/* ---------- Socle ---------- */

* {
    box-sizing: border-box !important;
    transition: ease all 0.5s;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.80857;
    font-weight: normal;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
}

a {
    color: #222222;
    text-decoration: none !important;
    outline: none !important;
    transition: all .3s ease-in-out;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0;
    position: relative;
    padding: 0 0 1vw 0;
    font-weight: normal;
    line-height: normal;
    color: #111111;
    margin: 0;
}

h1 { font-size: 24px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

ul, li, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

p {
    margin: 1px;
    font-weight: 300;
    font-size: 0.75vw;
    line-height: 24px;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    border: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
}

button:focus,
:focus {
    outline: 0;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #ffc94a !important;
    outline-offset: 3px;
}

.section-espacee {
    padding-top: 5vw;
    padding-bottom: 0;
}

.texte-masque {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Entête ---------- */

#entete {
    width: 100%;
    float: left;
    background-image: url(../images/fond-banniere-traineau.png);
    background-size: 100%;
    background-repeat: no-repeat;
}

#entete .navbar {
    padding: .5rem 40px;
}

.bg-light {
    background-color: transparent !important;
}

.navbar-expand-lg .navbar-nav {
    display: none;
}

#entete.entete-interieure .navbar-expand-lg .navbar-nav {
    display: flex;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#entete.entete-interieure .bg-light {
    background-color: #ff405c !important;
}

.navbar-nav .nav-link {
    font-size: 1vw;
    color: #fff !important;
    text-transform: uppercase;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .active > .nav-link {
    color: #000 !important;
}

#logo {
    width: 15%;
    float: left;
    color: #fff;
}

#logoTexte {
    font-family: 'Rochester', cursive;
    font-size: 4vw;
    color: #fff;
    font-weight: bold;
    padding: 0 0 1vw 0;
    margin: 0;
    line-height: normal;
    position: relative;
    white-space: nowrap;
}

#boiteOutils {
    width: 37%;
    float: right;
}

#listeOutils {
    width: 100%;
    float: left;
    margin: 0;
    padding: 0;
}

#listeOutils li {
    float: left;
    font-size: 18px;
    color: #ffffff;
    padding-left: 35px;
}

#listeOutils a,
#listeOutils button {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.80857;
}

#listeOutils a:hover,
#listeOutils button:hover {
    color: #000;
}

#outilCourriel {
    margin-left: 7vw;
}

.outil-texte {
    padding-left: 10px;
}

.action-langue {
    padding: 0 2px;
    opacity: 0.6;
}

.action-langue[aria-pressed="true"] {
    opacity: 1;
    font-weight: 700;
}

/* ---------- Bannière ---------- */

#banniere {
    width: 100%;
    float: left;
}

.diapositive-surtitre,
.diapositive-titre {
    width: 100%;
    float: left;
    color: #ffffff;
    font-family: 'Great Vibes', cursive;
    text-align: center;
    position: relative;
    margin: 0;
    padding: 0 0 1vw 0;
    line-height: normal;
}

.diapositive-surtitre {
    font-size: 50px;
    font-weight: normal;
}

.diapositive-titre {
    font-size: 100px;
    font-weight: bold;
}

.diapositive-action {
    clear: both;
    width: 170px;
    margin: 0 auto;
    padding-top: calc(153px + 1vw);
    text-align: center;
}

.diapositive-action a {
    width: 100%;
    float: left;
    font-size: 18px;
    color: #ffffff;
    background-color: #1a1a1a;
    padding: 7px 5px;
    border-radius: 40px;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.diapositive-action a:hover {
    color: #1a1a1a;
    background-color: #ffffff;
}

.carousel-control-prev,
.carousel-control-next {
    background: transparent;
}

/* ---------- Menu principal (barre sombre sous la bannière) ---------- */

#menuPrincipal {
    width: 100%;
    overflow: hidden;
    background-color: #2e2d2d;
}

#menuListe {
    width: 73%;
    margin: 0 auto;
    text-align: center;
}

#menuListe li {
    float: left;
    font-size: 18px;
    color: #ffffff;
    padding-left: 30px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

#menuPrincipal a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

#menuPrincipal a:hover {
    color: #fff;
    background-color: #ff405c;
}

#menuListe li.active a {
    color: #ffffff;
    background-color: #ff405c;
}

#menuListe li#actionDon {
    width: 170px;
    padding-left: 0;
}

#actionDon a {
    width: 100%;
    color: #000 !important;
    background-color: #ffffff;
    padding: 6px 5px !important;
    border-radius: 5px;
    margin-top: 8px;
    margin-left: 20px;
    text-transform: uppercase !important;
}

#menuPrincipal #actionDon a:hover {
    color: #fff !important;
    background-color: #ff405c;
}

.menu-fixe {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

/* ---------- À propos du compte à rebours ---------- */

#aPropos {
    width: 100%;
    float: left;
    background-color: #ffffff;
    padding: 5vw 0;
    position: relative;
}

#aProposIcone {
    width: 100%;
    float: left;
    position: relative;
    top: 20px;
    left: -8px;
    margin-top: 100px;
}

.titre-section {
    float: left;
    font-size: 50px;
    color: #292c29;
    font-weight: bold;
    position: relative;
    text-transform: uppercase;
}

.titre-section::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 10px;
    background-color: #e81d42;
    margin: 0 auto;
    left: 0;
    right: 0;
    display: block;
    border-radius: 100px;
}

.titre-centre {
    width: 100%;
    text-align: center;
}

#aProposTitre {
    width: 70%;
}

.titre-accent {
    color: #ff3f5c;
}

#aProposTexte {
    width: 100%;
    float: left;
    font-size: 16px;
    color: #292c29;
    margin: 0;
    padding-top: 30px;
}

#aProposTexte p {
    padding-left: 0;
    margin-left: 0;
    font-size: 1.5vw;
    line-height: 1.5vw;
}

#actionLireSuite {
    width: 170px;
    float: left;
    margin-top: 70px;
    position: relative;
    z-index: 1;
}

#actionLireSuite a {
    width: 100%;
    float: left;
    font-size: 18px;
    color: #ffffff;
    background-color: #1a1a1a;
    padding: 7px 5px;
    border-radius: 40px;
    text-align: center;
}

#actionLireSuite a:hover {
    background-color: #ff3f5c;
}

#aProposColonneIllustration {
    padding-top: 10vw;
}

.illustration-centree {
    width: 100%;
    float: left;
    text-align: center;
}

/* ---------- Cadeaux (bande rouge et carrousel) ---------- */

#cadeaux {
    width: 100%;
    float: left;
    padding: 0;
    position: relative;
}

.icone-sapin-titre {
    float: right;
    position: relative;
    top: 20px;
    left: -8px;
}

#cadeauxIcone { width: 64%; }

#bandeCadeaux {
    width: 100%;
    float: left;
    background-image: url(../images/fond-bande-cadeaux.png);
    background-size: 100%;
    background-repeat: no-repeat;
    padding-top: 5vw;
    padding-bottom: 73px;
}

#carrouselCadeaux {
    width: 100%;
    overflow: hidden;
}

#pisteCadeaux {
    display: flex;
    will-change: transform;
}

.cadeau {
    flex: 0 0 auto;
}

.cadeau img {
    display: block;
    width: 100%;
}

#navigationCadeaux {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.action-cadeau {
    width: 45px;
    height: 45px;
    margin: 0 10px;
    border-radius: 100px;
    background-color: #ffffff;
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

#actionCadeauPrecedent { background-image: url(../images/fleche-gauche.png); }
#actionCadeauSuivant { background-image: url(../images/fleche-droite.png); }
#actionCadeauPrecedent:hover { background-image: url(../images/fleche-gauche-survol.png); }
#actionCadeauSuivant:hover { background-image: url(../images/fleche-droite-survol.png); }

/* ---------- Extraits d'histoires (Père Noël et son cadre) ---------- */

#extraits {
    width: 100%;
    float: left;
    position: relative;
}

#extraitsIcone { width: 65%; }

#extraitsCadre {
    width: 100%;
    float: left;
    background-image: url(../images/pere-noel-cadre.png);
    background-size: auto 50vw;
    background-position: 9vw 0;
    background-repeat: no-repeat;
    padding-top: 18vw;
    padding-bottom: 9vw;
}

.extrait-porte {
    width: 30%;
    margin: 0 auto;
    padding-top: 2vw;
}

.extrait-porte-face {
    position: relative;
    aspect-ratio: 445 / 298;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--couleur-case);
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.2) 2px, transparent 3px),
                      radial-gradient(circle at 70% 60%, rgba(255,255,255,0.15) 2px, transparent 3px);
    background-size: 30px 30px;
    color: #ffffff;
    font-family: 'Fredoka', 'Poppins', sans-serif;
}

.extrait-porte-face strong {
    font-size: 4vw;
    line-height: 1;
}

.extrait-porte-face span {
    font-size: 2vw;
    line-height: 1.2;
}

.extrait-texte {
    width: 70%;
    font-size: 16px;
    text-align: center;
    margin: 0 auto;
    color: #262626;
    padding-top: 6vw;
}

.extrait-titre {
    width: 100%;
    font-size: 24px;
    font-weight: bold;
    color: #28313c;
    text-align: center;
    padding-top: 1.5vw;
}

.carousel-indicators li {
    width: 30px;
    height: 30px;
    margin-right: 3px;
    margin-left: 3px;
    border-radius: 100px;
    background-color: #e81d42;
}

.carousel-indicators .active {
    background-color: #232c35;
}

.carousel-indicators {
    bottom: -60px;
}

/* ---------- À ton tour (bande rouge, ballons) ---------- */

#aTonTour {
    width: 100%;
    float: left;
}

#aTonTourFond {
    width: 100%;
    float: left;
    background-color: #e81d42;
    position: relative;
}

#aTonTourDecor {
    width: 90%;
    float: left;
    position: relative;
    top: -120px;
}

#aTonTourBoite {
    width: 100%;
    float: left;
    padding: 110px 0 30px 0;
}

#aTonTourTitre {
    width: 100%;
    float: left;
    font-size: 40px;
    color: #ffffff;
    font-weight: bold;
}

#aTonTourTitre::after {
    content: '';
    position: absolute;
    width: 65px;
    height: 10px;
    background-color: #ffffff;
    border-radius: 100px;
    left: 0;
    display: block;
    bottom: -10px;
}

#aTonTourSousTitre {
    width: 100%;
    float: left;
    font-size: 18px;
    color: #ffffff;
    text-transform: uppercase;
    padding: 40px 0 1vw 0;
    margin: 0;
    font-weight: normal;
    line-height: normal;
    position: relative;
}

#aTonTourTexte {
    width: 100%;
    float: left;
    font-size: 16px;
    color: #ffffff;
    margin: 0;
    padding-top: 20px;
}

#actionATonTour {
    width: 170px;
    float: left;
    margin-top: 10px;
}

#actionATonTour a,
#actionATonTour button {
    width: 100%;
    float: left;
    font-size: 18px;
    line-height: 1.80857;
    color: #ffffff;
    background-color: #262626;
    padding: 7px 5px;
    border-radius: 4px;
    text-align: center;
}

#actionATonTour a:hover,
#actionATonTour button:hover {
    color: #000;
    background-color: #ffffff;
}

/* ---------- Infolettre ---------- */

#infolettre {
    width: 100%;
    float: left;
    padding-bottom: 5vw;
}

#infolettreIcone { width: 77%; }

#infolettreTitre {
    width: 100%;
    float: left;
    font-size: 50px;
    color: #292c29;
    font-weight: bold;
    text-align: center;
    padding-bottom: 50px;
}

#champsCourrielInfolettre {
    width: 70%;
    margin: 0 auto;
    font-size: 16px;
    line-height: inherit;
    color: #191616;
    padding: 15px 20px;
    background-color: #e6e5e4;
    border-radius: 30px;
    font-weight: bold;
    border: 0;
    display: block;
}

#actionInscription {
    width: 220px;
    margin: 0 auto;
    text-align: center;
}

#actionInscription button {
    width: 100%;
    float: left;
    font-size: 18px;
    line-height: 1.80857;
    color: #ffffff;
    text-align: center;
    background-color: #e81d42;
    padding: 8px 5px;
    border-radius: 30px;
    margin-top: 30px;
    text-transform: uppercase;
}

#actionInscription button:hover {
    background-color: #1a1a1a;
}

.message-formulaire {
    clear: both;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    min-height: 0;
    padding-top: 10px;
}

.message-formulaire:empty {
    display: none;
}

/* ---------- Pied de page ---------- */

#pied {
    width: 100%;
    float: left;
    background-image: url(../images/fond-pied-sapins.png);
    padding: 30px 0 0 0;
}

#pied.pied-contact {
    padding-top: 3.5vw;
}

#boiteDate {
    width: 100%;
    display: flex;
}

#dateNoel {
    width: 20%;
    float: left;
    font-size: 30px;
    color: #fff;
    text-transform: uppercase;
    border-right: 5px solid #e81d42;
    padding: 0 0 1vw 0;
    margin: 0;
    font-weight: normal;
    line-height: normal;
    position: relative;
}

#dateTexte {
    width: 100%;
    float: left;
    font-size: 16px;
    color: #fff;
    margin-left: 0;
    padding-left: 25px;
}

#contactTitre {
    width: 100%;
    float: left;
    font-size: 40px;
    color: #f3f3f3;
    padding: 50px 0 0 0;
    line-height: 1.80857;
}

#contact {
    width: 100%;
    float: left;
    padding-top: 30px;
}

#formulaireContact {
    width: 100%;
    float: left;
}

.groupe-champs {
    margin-bottom: 30px;
}

.champs-contact {
    display: block;
    color: #292929;
    width: 100%;
    height: 55px;
    font-family: inherit;
    font-size: 18px;
    line-height: 1.15;
    padding: 20px;
    background-color: #fefeff;
    border: 0;
    border-radius: 30px;
    margin: 0;
}

#champsMessageContact {
    height: 110px;
    padding: 40px 20px 10px;
    overflow: auto;
    resize: vertical;
}

#actionEnvoyerContact {
    width: 170px;
    text-align: center;
    margin: 0 auto;
}

#actionEnvoyerContact button {
    width: 100%;
    float: left;
    color: #fefeff;
    font-size: 18px;
    line-height: 1.80857;
    padding: 10px 0;
    background-color: #f0b016;
    border-radius: 30px;
}

#actionEnvoyerContact button:hover {
    color: #000;
    background-color: #ffffff;
}

#formulaireContact .message-formulaire {
    color: #ffffff;
}

#carte iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}

#reseauxSociaux {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#reseauxSociaux ul {
    margin: 0;
    padding: 0;
    display: inline-block;
    text-align: center;
}

#reseauxSociaux li {
    float: left;
    padding-right: 10px;
    padding-top: 50px;
    text-align: center;
}

#droits {
    width: 100%;
    float: left;
    padding-top: 30px;
}

#droitsTexte {
    width: 100%;
    float: left;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    margin-left: 0;
}

#droitsTexte a {
    color: #ffffff;
}

#droitsTexte a:hover {
    color: #ff3f5c;
}

/* ==========================================================================
   Pages intérieures
   ========================================================================== */

#cadeauxTitre,
#extraitsTitre,
#compteReboursTitre {
    width: 100%;
}

#ideesCadeaux {
    width: 100%;
    float: left;
    padding: 5vw 0;
}

#grilleIdees {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.idee-cadeau {
    background-color: #ffffff;
    border-radius: 30px;
    border-top: 10px solid #e81d42;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.idee-cadeau-icone {
    font-size: 40px;
    line-height: 1;
}

.idee-cadeau-titre {
    font-size: 22px;
    font-weight: bold;
    color: #292c29;
    padding-top: 15px;
}

.idee-cadeau-texte {
    font-size: 16px;
    color: #262626;
    margin: 0;
}

#ideesCadeauxNote {
    font-size: 14px;
    text-align: center;
    margin: 30px auto 0;
    max-width: 700px;
}

/* Formulaire « À ton tour » (page Vos histoires) */

#formulaireHistoire {
    width: 100%;
    float: left;
    padding-top: 20px;
}

#formulaireHistoire .champs-contact {
    margin-bottom: 15px;
}

#champsHistoireVisiteur {
    height: 160px;
    padding: 20px;
    resize: vertical;
    overflow: auto;
}

#formulaireHistoire .message-formulaire {
    color: #ffffff;
    text-align: left;
}

/* ==========================================================================
   Calendrier de l'Avent : les 24 boîtes (couleurs et effets d'origine)
   ========================================================================== */

:root {
    --rose: #ff3f5c;
    --rose-pale: #ffe3e8;
    --creme: #fff8f0;
    --nuit: #1d1640;
    --nuit-claire: #2e2466;
    --or: #ffc94a;
    --vert-sapin: #2f8f5b;
    --rouge-profond: #c4304d;
    --police-boite: 'Fredoka', 'Poppins', sans-serif;
    --ombre-case: 0 6px 0 rgba(0,0,0,0.18), 0 12px 24px rgba(0,0,0,0.25);
}

.couleur-rose { --couleur-case: var(--rose); }
.couleur-sapin { --couleur-case: var(--vert-sapin); }
.couleur-nuit { --couleur-case: var(--nuit-claire); }
.couleur-rouge { --couleur-case: var(--rouge-profond); }

#compteRebours {
    width: 100%;
    float: left;
    padding-bottom: 3vw;
}

#compteReboursIcone { width: 66%; }

#compteReboursConsigne {
    width: 100%;
    float: left;
    text-align: center;
    font-size: 18px;
    color: #292c29;
    padding-top: 40px;
    margin: 0;
}

#boiteCompteur {
    clear: both;
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 1.2rem);
    padding-top: 30px;
}

.case-compteur {
    background: var(--rose);
    border-radius: 16px;
    padding: 0.8rem 1rem;
    min-width: 80px;
    text-align: center;
    box-shadow: var(--ombre-case);
    font-family: var(--police-boite);
}

.case-compteur strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1;
    color: #ffffff;
}

.case-compteur small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rose-pale);
}

#calendrier {
    position: relative;
    width: 100%;
    float: left;
    overflow: hidden;
    background-color: var(--nuit);
    background-image: radial-gradient(ellipse at 50% 120%, rgba(255,63,92,0.35), transparent 60%),
                      radial-gradient(circle at 80% 10%, rgba(255,201,74,0.15), transparent 30%);
    padding: 5vw 0 6vw;
}

#canvasNeige {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#calendrierTitre {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    font-size: 40px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 4px 0 var(--rose);
}

#grilleCases {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: clamp(0.7rem, 2vw, 1.2rem);
    max-width: 1000px;
    margin: 30px auto 0;
    perspective: 900px;
}

.case-jour {
    position: relative;
    aspect-ratio: 1;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-family: var(--police-boite);
    transform-style: preserve-3d;
    transition: transform 0.25s;
    background: transparent;
}

.case-jour:hover:not(.verrouillee) { transform: translateY(-4px) rotate(-2deg); }

.case-jour:focus-visible { outline: 3px solid var(--or); outline-offset: 4px; }

.porte-case {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: var(--couleur-case);
    box-shadow: var(--ombre-case);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transform-origin: left center;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.2) 2px, transparent 3px),
                      radial-gradient(circle at 70% 60%, rgba(255,255,255,0.15) 2px, transparent 3px);
    background-size: 30px 30px;
}

.porte-case strong { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; }
.porte-case small { font-size: 0.7rem; opacity: 0.8; margin-top: 0.3rem; }

.interieur-case {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: var(--creme);
    color: var(--nuit);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.2);
    transition: none;
}

.case-jour.ouverte .porte-case { transform: rotateY(-105deg); }
.case-jour.verrouillee { cursor: not-allowed; }
.case-jour.verrouillee .porte-case { filter: saturate(0.5) brightness(0.8); }

.case-jour.verrouillee .porte-case::after {
    content: '🔒';
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.9rem;
}

.case-jour.aujourdhui .porte-case {
    animation: pulsation 1.6s ease-in-out infinite;
}

@keyframes pulsation {
    0%, 100% { box-shadow: var(--ombre-case), 0 0 0 0 rgba(255,201,74,0.7); }
    50% { box-shadow: var(--ombre-case), 0 0 0 10px rgba(255,201,74,0); }
}

.case-jour.secouee { animation: secousse 0.4s; }

@keyframes secousse {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px) rotate(-2deg); }
    75% { transform: translateX(6px) rotate(2deg); }
}

/* Lecture d'une histoire */

#boiteHistoire {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15,10,40,0.75);
    backdrop-filter: blur(6px);
    padding: 1rem;
}

#boiteHistoire.visible { display: flex; }

#feuilleHistoire {
    position: relative;
    background: var(--creme);
    color: var(--nuit);
    border-radius: 24px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border-top: 10px solid var(--rose);
    animation: apparition 0.4s ease-out;
}

@keyframes apparition {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

#histoireJour {
    font-family: var(--police-boite);
    color: var(--rose);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin: 0;
}

#histoireTitre {
    font-family: var(--police-boite);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    line-height: 1.15;
    color: var(--nuit);
    margin: 0.3rem 0 1.2rem;
}

#histoireTexte p {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--nuit);
}

#histoireTexte p:first-child::first-letter {
    font-family: var(--police-boite);
    font-size: 3rem;
    float: left;
    line-height: 0.9;
    margin: 0.1rem 0.5rem 0 0;
    color: var(--rose);
}

#actionFermerHistoire {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rose-pale);
    color: var(--rose);
    font-size: 1.3rem;
}

@media (prefers-reduced-motion: reduce) {
    *, .porte-case { transition: none !important; }
    .case-jour.aujourdhui .porte-case { animation: none; }
}

/* ==========================================================================
   Adaptation aux écrans (valeurs reprises de responsive.css)
   ========================================================================== */

@media (min-width: 992px) and (max-width: 1199px) {
    #banniere { padding-top: 20px; }
    #boiteOutils { width: 51%; }
    #menuListe { width: 90%; }
    .diapositive-action { padding-top: calc(118px + 1vw); }
    .diapositive-action a { margin-top: 12px; }
    #aProposTitre { width: 82%; }
    .extrait-porte { padding-top: 243px; }
    #infolettreIcone { width: 82%; }
    #dateNoel { width: 25%; }
    #entete.entete-interieure #boiteOutils { display: none; }
}

@media (max-width: 991px) {
    #entete { background-size: cover; }
    #logo { width: 40%; }
    #logoTexte { font-size: 32px; }
    #entete .navbar { padding: .5rem 15px; }
    .navbar-toggler { background-color: #fff; border: 1px solid transparent; }
    #boiteOutils, #menuDroite { display: none; }
    .navbar-expand-lg .navbar-nav,
    #entete.entete-interieure .navbar-expand-lg .navbar-nav { display: block; }
    .navbar-nav .nav-link { font-size: 18px; }
    .carousel-control-prev, .carousel-control-next { display: none; }
    .diapositive-action { padding-top: calc(38px + 1vw); }
    #dateNoel { width: 40%; }
    #carte { margin-top: 30px; }
    #boiteLangueMobile { display: flex; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .diapositive-titre { font-size: 82px; }
    #aProposTitre { width: 100%; font-size: 44px; }
    #aProposIcone { margin-top: 0; }
    #cadeauxIcone { width: 73%; left: -5px; }
    #bandeCadeaux { background-size: cover; }
    #extraitsIcone { width: 74%; }
    .extrait-porte { padding-top: 185px; }
    #aTonTourBoite { padding: 10px 0 20px 0; }
    #aTonTourDecor { top: 25px; }
    #infolettreIcone { width: 95%; }
}

@media (max-width: 767px) {
    .diapositive-surtitre { font-size: 40px; }
    .diapositive-titre { font-size: 50px; color: #000; }
    #aProposIcone { margin-top: 0; top: 15px; left: -12px; }
    #aProposTitre { width: 55%; font-size: 38px; }
    #aProposTexte p { font-size: 16px; line-height: 24px; }
    .titre-section { font-size: 36px; }
    #cadeauxIcone { width: 73%; top: 15px; left: -9px; }
    #bandeCadeaux { background-size: cover; }
    #extraitsIcone { width: 96%; }
    .extrait-porte { width: 30%; transform: translateY(131%); padding-top: 0; }
    .extrait-texte { width: 100%; font-size: 16px; padding-top: 190px; }
    #aTonTourFond .row { flex-direction: column-reverse; }
    #aTonTourBoite { padding: 90px 0 40px 0; }
    #aTonTourTitre { font-size: 30px; }
    #aTonTourSousTitre { font-size: 16px; }
    #aTonTourDecor { width: 100%; top: 0; }
    #aTonTourTexte { font-size: 16px; }
    #infolettreTitre { font-size: 38px; }
    #infolettreIcone { width: 93%; top: 12px; }
    #champsCourrielInfolettre { width: 100%; }
    #dateNoel { width: 100%; }
    #boiteDate { display: block; }
    #dateTexte { padding-left: 0; font-size: 16px; }
    #carte { padding-top: 30px; }
    #aTonTour { padding-top: 0; }
    p { font-size: 14px; }
}

@media (max-width: 575px) {
    .diapositive-surtitre { font-size: 24px; }
    #aProposTitre { width: 100%; }
    #cadeauxIcone { width: 90%; }
    .extrait-porte { transform: translateY(120%); }
    .extrait-texte { padding-top: 160px; }
}

/* Choix de langue en mobile (le menu d'outils est masqué sous 992px) */
#boiteLangueMobile {
    display: none;
    gap: 6px;
    padding: 10px 15px;
}

#boiteLangueMobile .action-langue {
    color: #ffffff;
    font-size: 18px;
}

/* Pages intérieures : le logo texte remplace le logo image du gabarit,
   on lui laisse sa place à côté du menu */
#entete.entete-interieure #logo {
    width: auto;
    flex-shrink: 0;
    margin-right: 30px;
}

#entete.entete-interieure #logoTexte {
    font-size: 2.6vw;
    padding: 0;
}

#entete.entete-interieure .navbar-collapse {
    flex-basis: 0;
}

.navbar-nav .nav-link {
    white-space: nowrap;
}

@media (max-width: 991px) {
    #entete.entete-interieure #logoTexte { font-size: 32px; }
}

@media (max-width: 575px) {
    #grilleCases { grid-template-columns: repeat(3, 1fr); }
}

/* Corrections de débordement (le gabarit d'origine faisait tomber
   « Donate Now » sur une deuxième ligne sous 1366 px) */
#listeOutils {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

#outilCourriel {
    margin-left: 0;
}

@media (min-width: 1200px) and (max-width: 1365px) {
    #menuListe { width: 90%; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    #menuListe li { padding-left: 8px; }
    #menuPrincipal a { padding: 14px 12px; }
    #listeOutils li { padding-left: 20px; }
}

@media (min-width: 992px) and (max-width: 1099px) {
    #menuPrincipal a { font-size: 15px; padding: 14px 9px; }
}

/* Les libellés français sont plus longs : on élargit le menu */
@media (min-width: 1200px) and (max-width: 1599px) {
    html[lang="fr"] #menuListe { width: 90%; }
}
