/* Gabarit moderne des pages d'un rêve, chargé uniquement sur ces pages, après responsive.css.
   Bleu clair historique du site (#95d6f1), texte foncé pour rester lisible.
   Polices système : rien de chargé depuis l'extérieur (rapidité, pas de transfert vers Google Fonts). */

:root {
    --bleu-historique: #95d6f1;
    --bleu-pale: #ddf1fb;
    --bleu-fond: #f4fbff;
    --bleu-bord: #bfe3f5;
    --bleu-action: #0b5c8e;
    --bleu-titre: #0b4f7a;
    --bleu-encre: #0b3a5c;
    --texte: #18233b;
    --orange-accent: #a64b00;
    --police-titre: Georgia, "Times New Roman", serif;
    --police-texte: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Base */
html,
body {
    height: auto;
    min-height: 0;
    background: var(--bleu-fond);
}

.gabarit-reve {
    color: var(--texte);
    font: 400 1.0625rem/1.55 var(--police-texte);
}

.gabarit-reve :focus-visible {
    outline: 3px solid var(--bleu-encre);
    outline-offset: 2px;
}

.gabarit-reve .structure-site,
.gabarit-reve .principal {
    width: 100%;
    height: auto;
    min-height: 0;
}

.gabarit-reve a:link,
.gabarit-reve a:visited,
.gabarit-reve a:active {
    color: var(--bleu-action);
    text-decoration: underline;
}

/* En-tête : marque + menu, recherche, alphabet */
.gabarit-reve header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
        "marque menu"
        "recherche recherche"
        "alphabet alphabet";
    gap: 10px 12px;
    box-sizing: border-box;
    padding: 10px 16px 12px;
    color: var(--bleu-encre);
    background: var(--bleu-historique);
}

.gabarit-reve a.gabarit-marque:link,
.gabarit-reve a.gabarit-marque:visited {
    grid-area: marque;
    align-self: center;
    color: var(--bleu-encre);
    font: 700 1.35rem/1.2 var(--police-titre);
    text-decoration: none;
}

/* La marque remplace l'ancien bandeau illustré */
.gabarit-reve #bandeau {
    display: none;
}

.gabarit-reve #menuAlpha {
    display: contents;
}

/* Recherche */
.gabarit-reve .moteur-gg {
    display: block;
    grid-area: recherche;
    float: none;
    width: 100%;
}

.gabarit-reve .moteur-gg::before {
    content: "De quoi avez-vous r\00EA v\00E9  ?";
    display: block;
    margin-bottom: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.gabarit-reve .cse-branding-bottom {
    background: transparent !important;
    color: inherit !important;
}

.gabarit-reve #cse-search-box > div {
    display: flex;
    gap: 8px;
}

.gabarit-reve #cse-search-box input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--bleu-action);
    border-radius: 8px;
    color: var(--texte);
    font: inherit;
    background: #fff;
}

.gabarit-reve #cse-search-box input[type="submit"] {
    flex: none;
    height: 48px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    background: var(--bleu-action);
    cursor: pointer;
}

/* Mention Google conservée, en plus discret */
.gabarit-reve .cse-branding-logo,
.gabarit-reve .cse-branding-text {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.75rem;
    vertical-align: middle;
}

/* Alphabet : une ligne qui défile sur mobile, cibles de 44 px */
.gabarit-reve .menuAlphabet {
    display: flex;
    grid-area: alphabet;
    gap: 6px;
    float: none;
    width: auto;
    margin: 0 -16px;
    padding: 0 16px 2px;
    overflow-x: auto;
}

.gabarit-reve .menuAlphabet br,
.gabarit-reve .menuAlphabet span {
    display: none;
}

.gabarit-reve a.liensAlphabet:link,
.gabarit-reve a.liensAlphabet:visited,
.gabarit-reve a.liensAlphabet:active,
.gabarit-reve a.liensAlphabet:hover {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid var(--bleu-bord);
    border-radius: 8px;
    color: var(--bleu-encre);
    font: 700 1rem/1 var(--police-texte);
    text-decoration: none;
    background: #fff;
}

/* Menu mobile : bouton compact, liste en panneau sous l'en-tête */
.gabarit-reve #menuNavigation {
    grid-area: menu;
    width: auto;
    height: 44px;
    border: 0;
    background: transparent;
}

.gabarit-reve .menu-bouton {
    display: none;
}

.gabarit-reve .show-menu,
.gabarit-reve #show-menu {
    position: absolute;
    top: 10px;
    right: 16px;
    display: block;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.gabarit-reve .show-menu {
    overflow: hidden;
    border: 1px solid var(--bleu-action);
    border-radius: 8px;
    color: transparent;
    font-size: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3a5c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E") center / 24px no-repeat;
}

/* Case à cocher invisible mais utilisable au clavier, posée sur le bouton */
.gabarit-reve #show-menu {
    z-index: 1;
    opacity: 0;
}

.gabarit-reve #menuNavigation:focus-within .show-menu {
    outline: 3px solid var(--bleu-encre);
    outline-offset: 2px;
}

.gabarit-reve #menu {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    z-index: 10000;
    border-bottom: 1px solid var(--bleu-bord);
    background: #fff;
}

.gabarit-reve #menu li {
    float: none;
    display: block;
    width: 100%;
    margin: 0;
}

.gabarit-reve #menu a:link,
.gabarit-reve #menu a:visited,
.gabarit-reve #menu a:active,
.gabarit-reve #menu a:hover {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-bottom: 1px solid var(--bleu-pale);
    color: var(--bleu-encre);
    font: 600 1rem/1.3 var(--police-texte);
    text-align: left;
    text-decoration: none;
    white-space: normal;
    background: #fff;
}

.gabarit-reve #menu .hidden {
    position: static;
    display: block;
}

.gabarit-reve #menu .hidden a:link,
.gabarit-reve #menu .hidden a:visited {
    padding-left: 32px;
    font-weight: 400;
}

/* Fil d'Ariane */
.gabarit-reve #filArianePage {
    padding: 14px 16px 0;
}

.gabarit-reve #filArianePage a:link,
.gabarit-reve #filArianePage a:visited,
.gabarit-reve #filArianePage span {
    padding: 0;
    font: 400 0.875rem/1.45 var(--police-texte);
}

.gabarit-reve #filArianePage a:link,
.gabarit-reve #filArianePage a:visited {
    color: var(--bleu-action);
}

.gabarit-reve #filArianePage span {
    color: #3f4b63;
}

/* Colonnes */
.gabarit-reve .col-droite {
    float: none;
    width: 100%;
    min-height: 0;
    margin: 0;
    color: var(--texte);
    background: transparent;
}

.gabarit-reve .col-droite::after {
    content: none;
}

.gabarit-reve .contentPage {
    padding: 10px 16px 0;
    color: var(--texte);
    font: inherit;
}

.gabarit-reve .contentPage p {
    padding: 0;
    color: inherit;
    font: inherit;
}

.gabarit-reve .contentPage > br {
    display: none;
}

/* Titres */
.gabarit-reve .contentPage h1 {
    margin: 0 0 14px;
    padding: 0;
    color: var(--bleu-titre);
    font: 700 1.9rem/1.15 var(--police-titre);
}

.gabarit-reve .contentPage h2,
.gabarit-reve .titreDescriptionMot h2 {
    clear: both;
    margin: 28px 0 12px;
    padding: 0;
    border: 0;
    color: var(--bleu-titre);
    font: 700 1.5rem/1.2 var(--police-titre);
    background: transparent;
    scroll-margin-top: 12px;
}

.gabarit-reve .contentPage h3 {
    margin: 8px 0 6px;
    padding: 0;
    color: var(--orange-accent);
    font: 700 1rem/1.35 var(--police-texte);
}

/* Texte d'accroche en carte */
.gabarit-reve #texteAccrocheDef {
    padding: 16px;
    border: 1px solid var(--bleu-bord);
    border-radius: 12px;
    background: #fff;
}

/* Sommaire */
.gabarit-reve .gabarit-sommaire {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.gabarit-reve .gabarit-sommaire a:link,
.gabarit-reve .gabarit-sommaire a:visited {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 22px;
    color: var(--bleu-encre);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--bleu-pale);
}

/* Publicité : place réservée pour éviter que le texte ne saute au chargement */
.gabarit-reve .contentAdBandeauPageInterne,
.gabarit-reve .contentAdfooterDicoDesReves {
    width: 100%;
    margin: 20px 0;
    padding: 0;
    min-height: 250px;
}

/* Mots pour lesquels la publicité est retirée : pas de trou */
.gabarit-reve .contentAdBandeauPageInterne:empty,
.gabarit-reve .contentAdfooterDicoDesReves:empty {
    display: none;
}

.gabarit-reve .contentAdfooterDicoDesReves {
    box-sizing: border-box;
    padding: 0 16px;
}

/* Symbolique */
.gabarit-reve .texteSymbole {
    float: none;
    width: 100%;
}

.gabarit-reve .imageSymbole {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 14px 0 0;
    border-radius: 12px;
}

/* Le tableau historique devient une suite de blocs */
.gabarit-reve .tableMotsContent,
.gabarit-reve .tableMotsContent tbody,
.gabarit-reve .tableMotsContent tr,
.gabarit-reve .tableMotsContent td {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
}

.gabarit-reve .tableMotsContent td:empty,
.gabarit-reve .tableMotsContent td[height="10"] {
    display: none;
}

.gabarit-reve .descriptionMot {
    margin-bottom: 12px;
}

.gabarit-reve .descriptionMot img {
    margin-right: 6px;
}

/* Significations dépliables */
.gabarit-reve .reveDepliable details {
    margin-bottom: 10px;
    border: 1px solid var(--bleu-bord);
    border-radius: 10px;
    background: #fff;
}

.gabarit-reve .reveDepliable summary {
    box-sizing: border-box;
    min-height: 44px;
    padding: 11px 14px;
    color: var(--bleu-titre);
    cursor: pointer;
}

.gabarit-reve .reveDepliable summary h2 {
    display: inline;
    margin: 0;
    color: inherit;
    font: 600 1.0625rem/1.35 var(--police-texte);
}

.gabarit-reve .reveDepliable .descriptionMot {
    margin: 0;
    padding: 0 14px 14px;
}

/* Rêves associés */
.gabarit-reve a.liensMot:link,
.gabarit-reve a.liensMot:visited,
.gabarit-reve a.liensMot:active,
.gabarit-reve a.liensMot:hover {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    color: var(--bleu-action);
    font: 600 1rem/1.3 var(--police-texte);
}

/* Bloc de recherche en bas de page */
.gabarit-reve .fondRecherche {
    padding: 8px 16px;
    color: var(--bleu-encre);
    font-weight: 600;
    background: var(--bleu-pale);
}

/* Retour en haut */
.gabarit-reve .backtotop {
    right: 12px;
    bottom: 20px;
    width: 44px;
    height: 44px;
}

/* Pied de page */
.gabarit-reve footer {
    display: block;
    box-sizing: border-box;
    margin-top: 28px;
    padding: 20px 16px;
    color: var(--bleu-encre);
    font: 400 0.9375rem/1.5 var(--police-texte);
    text-align: left;
    background: var(--bleu-historique);
}

.gabarit-reve footer br {
    display: none;
}

.gabarit-reve a.liensTitreFooter:link,
.gabarit-reve a.liensTitreFooter:visited,
.gabarit-reve a.liensTitreFooter:active,
.gabarit-reve a.liensTitreFooter:hover {
    color: var(--bleu-encre);
    font: 400 0.9375rem/1.5 var(--police-texte);
    text-decoration: underline;
}

/* Tablette et ordinateur : menu en ligne */
@media screen and (min-width: 769px) {
    .gabarit-reve header {
        grid-template-columns: auto minmax(0, 1fr) minmax(240px, 340px);
        grid-template-areas:
            "marque menu recherche"
            "alphabet alphabet alphabet";
        align-items: center;
        padding-inline: max(24px, calc((100% - 1180px) / 2));
    }

    .gabarit-reve #menuNavigation {
        height: auto;
    }

    .gabarit-reve .show-menu,
    .gabarit-reve #show-menu {
        display: none;
    }

    .gabarit-reve #menu {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 2px 10px;
        border: 0;
        background: transparent;
    }

    .gabarit-reve #menu > li {
        position: relative;
        width: auto;
    }

    .gabarit-reve #menu > li > a:link,
    .gabarit-reve #menu > li > a:visited,
    .gabarit-reve #menu > li > a:active,
    .gabarit-reve #menu > li > a:hover {
        width: auto;
        padding: 6px 4px;
        border: 0;
        font-size: 0.9375rem;
        white-space: nowrap;
        background: transparent;
    }

    /* Sous-menus au survol ou au clavier */
    .gabarit-reve #menu .hidden {
        position: absolute;
        top: 100%;
        left: 0;
        display: none;
        min-width: 270px;
        border: 1px solid var(--bleu-bord);
        background: #fff;
    }

    .gabarit-reve #menu > li:hover > .hidden,
    .gabarit-reve #menu > li:focus-within > .hidden {
        display: block;
    }

    .gabarit-reve .menuAlphabet {
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .gabarit-reve a.liensAlphabet:link,
    .gabarit-reve a.liensAlphabet:visited,
    .gabarit-reve a.liensAlphabet:active,
    .gabarit-reve a.liensAlphabet:hover {
        width: 38px;
        height: 38px;
    }

    .gabarit-reve #filArianePage {
        padding: 20px 0 0;
    }

    .gabarit-reve .contentPage {
        padding: 12px 0 0;
    }

    .gabarit-reve .contentPage h1 {
        font-size: 2.6rem;
    }

    .gabarit-reve .contentPage h2,
    .gabarit-reve .titreDescriptionMot h2 {
        font-size: 1.75rem;
    }

    .gabarit-reve .contentAdfooterDicoDesReves {
        padding: 0;
    }

    .gabarit-reve .texteSymbole {
        float: left;
        width: 62%;
    }

    .gabarit-reve .imageSymbole {
        float: right;
        width: 34%;
        margin: 0;
    }

    .gabarit-reve .tableMotsContent {
        clear: both;
    }

    .gabarit-reve footer {
        padding-inline: max(24px, calc((100% - 1180px) / 2));
    }
}

/* Grand écran : texte à gauche, colonne de publicité à droite */
@media screen and (min-width: 981px) {
    .gabarit-reve .principal {
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 32px;
        box-sizing: border-box;
        max-width: 1228px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .gabarit-reve .col-droite {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }

    .gabarit-reve .col-gauche {
        flex: none;
        float: none;
        width: 300px;
        padding-top: 20px;
        background: transparent;
    }
}
