/* ============================================
   CHARTE RENTALAB — habillage commun à toutes les pages
   --------------------------------------------
   Polices, jetons, bandeau, boutons, pied de page. Rien d'autre :
   aucune règle sur une balise nue hors du bandeau et du pied, pour
   que les pages qui ont leur propre feuille (le simulateur
   /acheter-ou-louer/) puissent la charger sans être déformées.
   style.css l'importe : les anciennes pages n'ont rien à changer.

   Règles de la version sobre (validées par Lucas le 28/11/2026) :
   - une seule note manuscrite (Caveat) par écran au plus, pour expliquer,
     jamais pour porter un chiffre ;
   - seule la carte du verdict peut être penchée ;
   - les chiffres restent droits, alignés, en chiffres de même largeur ;
   - un tampon ne porte qu'une conclusion.
   ============================================ */

/* 1. Polices — déclarations reprises d'Æquo (sous-ensemble latin : français,
   « Æ », « Œ », guillemets, espace fine insécable, « € »). DM Sans est une
   police variable : un seul fichier, déclaré pour chaque graisse utilisée.
   Licences SIL OFL 1.1 : /fonts/OFL-*.txt */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/dm-sans-variable.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/dm-sans-variable.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/fonts/dm-sans-variable.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/dm-sans-variable.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/instrument-serif.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/instrument-serif-italique.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/dm-mono-400.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/dm-mono-500.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Caveat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/caveat-500.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Jetons. Contrastes vérifiés sur --papier et --papier-clair : --encre,
   --encre-douce, --gris, --violet et --brique passent le niveau AA pour du
   texte courant ; --jaune et --lavande sont des fonds, jamais du texte. */
:root {
    /* Couleurs */
    --papier: #f7f2e7;
    --papier-clair: #fffaf0;
    --surface-creuse: #eee8da;
    --encre: #312c43;
    --encre-douce: #51495e;
    --gris: #625c66;
    --violet: #605073;
    --violet-fonce: #4b3f5b;
    --lavande: #ded8ed;
    --jaune: #f3da78;
    --brique: #b7472c;
    --brique-tampon: #9e3a23;
    --vert: #243d36;
    --trait: #cfc5b3;
    --filet: #b9ae96;

    /* Typographie */
    --police-titre: 'Instrument Serif', Georgia, serif;
    --police-texte: 'DM Sans', 'Segoe UI', sans-serif;
    --police-mono: 'DM Mono', ui-monospace, monospace;
    --police-main: 'Caveat', cursive;

    /* Formes */
    --rayon: 7px;
    --rayon-pilule: 999px;
    --ombre-dure: 3px 5px 0 rgba(49, 44, 67, 0.10);
    --ombre-dure-forte: 5px 9px 0 rgba(49, 44, 67, 0.14);
    --hauteur-bandeau: 60px;

    /* 3. Anciennes variables : à supprimer une fois toutes les pages refaites. */
    --color-primary: var(--violet);
    --color-primary-dark: var(--violet-fonce);
    --color-text: var(--encre);
    --color-text-light: var(--gris);
    --color-bg: var(--papier-clair);
    --color-bg-light: var(--papier);
    --color-border: var(--trait);
    --transition: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--police-texte);
    color: var(--encre);
    background-color: var(--papier);
    line-height: 1.6;
    overflow-x: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
}

/* Petit titre de section : « 01 — Question », en police à chasse fixe.
   Réutilisable par toutes les pages refaites. */
.surtitre {
    font-family: var(--police-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gris);
}


/* Le bandeau et le pied ne comptent pas sur la remise à zéro globale de
   style.css (« * { margin: 0 } ») : les pages qui ne chargent pas
   style.css gardent leurs marges, eux non. */
nav ul,
nav li,
footer h3,
footer p,
footer ul,
footer li {
    margin: 0;
    padding: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
/* Le bandeau jaune d'Æquo. Sa hauteur reste à 60 px : les pages
   compensent déjà cette hauteur, la changer décalerait leur contenu. */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--jaune);
    border-bottom: 1px solid var(--encre);
    z-index: 1000;
    padding: 0 22px;
    height: var(--hauteur-bandeau);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Le nom, comme celui d'Æquo : DM Sans gras, très serré, d'une seule
   couleur, suivi d'une petite flèche. */
.logo,
.app-nav-logo {
    font-family: var(--police-texte);
    font-size: 26px;
    font-weight: 700;
    color: var(--encre);
    text-decoration: none;
    letter-spacing: -0.06em;
    line-height: 1;
    transition: var(--transition);
}

.logo::after,
.app-nav-logo::after {
    content: '↗';
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    vertical-align: top;
    margin-left: 3px;
}

.logo:hover {
    color: var(--encre);
}

.logo-mark,
.logo-accent {
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    color: var(--encre);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--encre);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--encre);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
    width: 100%;
}

.nav-links a[aria-current="page"] {
    font-weight: 600;
}

/* Dropdown Simulateurs */
.nav-dropdown {
    position: relative;
    list-style: none;
    padding-bottom: 4px;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -8px;
    padding-top: 8px;
    min-width: 240px;
    padding-bottom: 8px;
    padding-left: 0;
    padding-right: 0;
    list-style: none;
    background: var(--papier-clair);
    border: 1px solid var(--encre);
    border-radius: 5px;
    box-shadow: var(--ombre-dure-forte);
    z-index: 200;
}

.nav-dropdown-menu li {
    list-style: none;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--encre);
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--encre);
    background: var(--surface-creuse);
}

.nav-dropdown-menu a::after {
    display: none;
}

@media (min-width: 769px) {
    .nav-dropdown:hover .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .nav-dropdown-toggle {
        display: block;
        text-align: center;
        width: 100%;
    }

    .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: flex;
        flex-direction: column;
        position: static;
        margin-top: 12px;
        margin-bottom: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-dropdown.open .nav-dropdown-menu a {
        padding: 8px 0;
    }
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--encre);
}

.nav-auth {
    display: flex;
    align-items: center;
    margin-left: 24px;
}

/* Bouton principal sur le bandeau : pilule à l'encre. */
.nav-login-btn {
    display: inline-block;
    background: var(--encre);
    color: var(--papier-clair);
    padding: 8px 18px;
    border-radius: var(--rayon-pilule);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.nav-login-btn:hover {
    background: var(--violet);
    color: var(--papier-clair);
}

.nav-user-menu {
    position: relative;
}

.nav-auth {
    min-width: 0;
    flex-shrink: 1;
    max-width: 100%;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--encre);
    border-radius: 0;
    padding: 6px 2px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--encre);
    max-width: min(100%, 240px);
    min-width: 0;
}

.nav-user-email {
    max-width: 20ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
}

.nav-user-chevron {
    flex-shrink: 0;
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    background: var(--encre);
    color: var(--jaune);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .nav-user-email {
        display: none;
    }

    .nav-user-btn {
        max-width: none;
        padding: 6px 10px;
    }
}

.nav-user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--papier-clair);
    border: 1px solid var(--encre);
    border-radius: 5px;
    box-shadow: var(--ombre-dure-forte);
    min-width: 190px;
    z-index: 1000;
    overflow: hidden;
}
.nav-user-dropdown.open {
    display: block;
}
.nav-user-dropdown a,
.nav-user-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--encre);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
    background: var(--surface-creuse);
}
.nav-user-dropdown hr {
    margin: 4px 0;
    border: none;
    border-top: 1px solid var(--trait);
}

/* ============================================
   BUTTONS
   ============================================ */
/* Bouton principal d'Æquo : pilule à l'encre, ombre jaune décalée.
   Le bouton secondaire : contour fin à l'encre. */
.btn {
    display: inline-block;
    padding: 12px 26px;
    background-color: var(--encre);
    color: var(--papier-clair);
    text-decoration: none;
    border-radius: var(--rayon-pilule);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--encre);
    box-shadow: 3px 4px 0 var(--jaune);
    cursor: pointer;
}

.btn:hover {
    background-color: var(--violet);
    border-color: var(--violet);
    color: var(--papier-clair);
}

.btn-secondary {
    background-color: transparent;
    color: var(--encre);
    border: 1px solid var(--encre);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--encre);
    border-color: var(--encre);
    color: var(--papier-clair);
}

/* ============================================
   FOOTER
   ============================================ */
/* Pied de page : papier, filet à l'encre, colonnes alignées à gauche,
   intitulés en police à chasse fixe. */
footer {
    background: var(--papier);
    padding: 48px 22px 28px;
    border-top: 1px solid var(--encre);
    margin-top: 100px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-trust {
    text-align: left;
    padding: 0 0 22px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--filet);
}

.footer-trust p {
    font-size: 13px;
    color: var(--gris);
    line-height: 1.7;
    max-width: 820px;
    margin: 0;
}

.footer-trust strong {
    color: var(--encre);
    font-weight: 500;
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    gap: 40px 96px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-column {
    text-align: left;
}

/* La présentation, en tête : une colonne étroite, pour que les quatre
   colonnes tiennent sur une ligne. */
.footer-column:first-child {
    max-width: 260px;
}

.footer-column h3 {
    font-family: var(--police-mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--gris);
    margin-bottom: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--encre);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: inline-block;
}

.footer-column a:hover {
    color: var(--violet);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-column p {
    font-size: 14px;
    color: var(--encre-douce);
}

.footer-bottom {
    padding-top: 18px;
    border-top: 1px solid var(--filet);
    text-align: left;
}

.footer-bottom p {
    font-family: var(--police-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--gris);
    margin: 0;
}

.footer-links {
    display: none;
}

/* ============================================
   BANDEAU ET PIED SUR PETIT ÉCRAN
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--hauteur-bandeau);
        left: 0;
        width: 100%;
        background-color: var(--jaune);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--encre);
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-links > li {
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-links > li > a {
        display: block;
        width: 100%;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Footer responsive */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }

    .footer-trust {
        padding: 20px 0 !important;
        margin-bottom: 30px !important;
    }

    .footer-trust p {
        font-size: 14px !important;
    }
}
