/* Site Koneli — même thème que Koloc (couleurs, polices, formes) : c'est le
   thème de la société et de toutes ses applications.

   Polices hébergées sur le site, sans appel extérieur (licence libre SIL
   OFL, texte de la licence dans assets/fonts/) : Outfit pour les titres,
   Figtree pour le texte. */
@font-face {
    font-family: "Outfit";
    src: url('../fonts/Outfit-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Figtree";
    src: url('../fonts/Figtree-Variable.woff2') format('woff2');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

/* Couleurs : celles de Koloc (mêmes noms, mêmes valeurs), plus quelques
   teintes propres au site vitrine en fin de bloc. Chaque couleur garde le
   même nom en mode sombre (bloc suivant) : pour en changer une, modifier sa
   valeur ici et, si besoin, dans le bloc du mode sombre. */
:root {
    --bg: #FBF7F2;               /* fond des pages, blanc chaud */
    --card: #FFFFFF;             /* cartes, en-tête, pied de page */
    --card-alt: #F8F1E9;
    --text: #031939;             /* bleu nuit du logo */
    --muted: #6B6158;            /* texte secondaire, gris chaud */
    --border: #EADFD2;
    --border-soft: #F2EAE0;
    --border-champ: #9A8B7B;
    --champ-fond: #FFFFFF;

    --orange: #FD8C01;           /* orange du logo : boutons pleins */
    --orange-survol: #F07C00;
    --orange-contour: #E06E00;
    --orange-texte: #A64B00;     /* texte orange : liens */
    --orange-doux: #FFF1E0;      /* boutons secondaires, choix actifs */
    --orange-doux-survol: #FFE6C7;
    --orange-doux-texte: #8A4A00;
    --orange-halo: #FFD9A8;
    --sur-orange: #031939;       /* texte posé sur l'orange */
    --lien: var(--orange-texte);

    --green-texte: #167443;
    --vert-doux: #E3F4EA;
    --red: #C8283F;
    --rouge-doux: #FBE9EC;
    --tag-fond: #F3ECE4;
    --tag-texte: #5A4A3A;

    --radius: 20px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-card: 0 12px 32px -18px rgba(110, 70, 30, 0.28);
    --shadow-soft: 0 4px 14px -10px rgba(110, 70, 30, 0.2);

    --police-titres: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --police-texte: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Propres au site vitrine */
    --bg-teinte: #F5ECE1;        /* sections une sur deux */
    --entete-fond: rgba(255, 255, 255, 0.88);
    --halo-hero: #FFE2BD;        /* disque derrière le koala */
    --ombre-forte: 0 30px 60px -30px rgba(110, 70, 30, 0.45);
    --cadre-telephone: #0B1220;
    color-scheme: light;
}

/* Mode sombre : mêmes variables, valeurs de Koloc pour le fond bleu nuit. */
html[data-theme="sombre"] {
    --bg: #08141F;
    --card: #0F1E2C;
    --card-alt: #132637;
    --text: #ECF5FB;
    --muted: #93A8BA;
    --border: #213B52;
    --border-soft: #1A3045;
    --border-champ: #5C7A94;
    --champ-fond: #0B1824;

    --orange: #FF9F2E;
    --orange-survol: #FFB257;
    --orange-contour: #FF9F2E;
    --orange-texte: #FFB866;
    --orange-doux: #3A2810;
    --orange-doux-survol: #4A3214;
    --orange-doux-texte: #FFC27A;
    --orange-halo: #5A3A10;
    --sur-orange: #031939;

    --green-texte: #3DD68C;
    --vert-doux: #0F2E21;
    --red: #FF6B81;
    --rouge-doux: #3A1A24;
    --tag-fond: #1C2B3A;
    --tag-texte: #B5C6D6;

    --shadow-card: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 4px 14px -10px rgba(0, 0, 0, 0.5);

    --bg-teinte: #0B1926;
    --entete-fond: rgba(15, 30, 44, 0.9);
    --halo-hero: #2A1D0E;
    --ombre-forte: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    --cadre-telephone: #02070D;
    color-scheme: dark;
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Les ancres ne passent pas sous l'en-tête collé en haut. */
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--police-texte);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--police-titres);
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.08rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--lien); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

button, input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
    outline: 3px solid var(--orange-contour);
    outline-offset: 2px;
    border-radius: 4px;
}

.conteneur {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.lien-evitement {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--card);
    border: 2px solid var(--orange-contour);
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.lien-evitement:focus { top: 12px; }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------------
   Boutons (comme Koloc : orange plein, orange doux en secondaire)
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--orange);
    border-radius: var(--radius-sm);
    background: var(--orange);
    color: var(--sur-orange);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.btn:hover {
    background: var(--orange-survol);
    border-color: var(--orange-survol);
    text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn.secondaire {
    background: var(--orange-doux);
    border-color: var(--orange-doux);
    color: var(--orange-doux-texte);
}

.btn.secondaire:hover {
    background: var(--orange-doux-survol);
    border-color: var(--orange-doux-survol);
}

.btn-grand { padding: 14px 24px; font-size: 1.05rem; }
.btn-petit { padding: 9px 16px; font-size: 0.95rem; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------------------------------------------------------------------
   En-tête
   --------------------------------------------------------------------- */
.entete {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

/* Fond flouté sur un calque à part : posé sur l'en-tête lui-même, le flou
   empêcherait Chrome de dessiner le menu des langues qui en dépasse. */
.entete::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--entete-fond);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
}

.entete-interieur {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
}

.entete-logo {
    display: inline-flex;
    flex-shrink: 0;
}

.entete-logo img {
    display: block;
    height: 54px;
    width: auto;
}

.entete-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.entete-lien {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.entete-lien:hover,
.entete-lien[aria-current="page"] {
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
}

.entete-contact { margin-left: 6px; }

.entete-outils {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-rond {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    min-width: 38px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s ease;
}

.bouton-rond:hover { border-color: var(--orange-contour); }

.bouton-rond img { display: block; }

#icone-theme { width: 18px; height: 18px; }

/* Menus déroulants (Applications, langues) : des <details>, refermés par
   site.js au clic ailleurs ou avec Échap. */
.menu-deroulant { position: relative; }

.menu-deroulant summary { list-style: none; cursor: pointer; }
.menu-deroulant summary::-webkit-details-marker { display: none; }

.chevron {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .15s ease;
}

.menu-deroulant[open] .chevron { transform: rotate(180deg); }

.bouton-langue img { border-radius: 3px; }

.menu-applis summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.menu-applis[open] summary,
.menu-applis summary.actif {
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
}

.menu-liste {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 10;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.menu-liste-droite { left: auto; right: 0; }

.menu-applis .menu-liste { min-width: 240px; }

.menu-liste a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.menu-liste a:hover,
.menu-liste a[aria-current] {
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
}

.menu-liste img { border-radius: 3px; }

/* Une application : son nom, et en dessous ce qu'elle fait. */
.menu-applis .menu-liste strong { display: block; }
.menu-applis .menu-liste a:has(strong) { flex-direction: column; align-items: flex-start; gap: 0; }
.menu-applis .menu-liste span { font-size: .88rem; font-weight: 500; color: var(--muted); }

.menu-liste-tout {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.menu-liste-tout a { font-size: .92rem; }

/* ---------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------- */
.section { padding: 96px 0; }

.section-teintee {
    background: var(--bg-teinte);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.section-entete {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-entete .chapo { margin: 0 auto; }

.surtitre {
    margin: 0 0 12px;
    color: var(--orange-texte);
    font-family: var(--police-titres);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chapo {
    color: var(--muted);
    font-size: 1.2rem;
    max-width: 640px;
}

.sous-titre-section {
    margin: 88px 0 32px;
    text-align: center;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 800;
}

.carte {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 28px;
}

/* ---------------------------------------------------------------------
   Accueil : hero
   --------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: 72px 0 88px;
    overflow: hidden;
}

/* Taches d'orange doux dans le fond. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 6% 16%, var(--orange-doux) 0, transparent 24%),
        radial-gradient(circle at 96% 42%, var(--orange-doux) 0, transparent 20%);
    pointer-events: none;
}

.hero-grille {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
}

.hero h1 { margin-bottom: 20px; }

.surligne {
    background: linear-gradient(transparent 62%, var(--orange-halo) 62%, var(--orange-halo) 92%, transparent 92%);
    padding: 0 4px;
    margin: 0 -4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.hero .chapo { margin-bottom: 32px; }

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-weight: 600;
}

.hero-points li,
.liste-coches li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-points li::before,
.liste-coches li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
    font-size: 0.8rem;
    font-weight: 800;
}

.hero-visuel {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 88%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--halo-hero) 0, var(--halo-hero) 55%, transparent 71%);
}

.hero-logo {
    position: relative;
    width: 100%;
    max-width: 470px;
    filter: drop-shadow(0 24px 30px rgba(110, 70, 30, 0.18));
    animation: flotte 6s ease-in-out infinite;
}

@keyframes flotte {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* ---------------------------------------------------------------------
   L'esprit Koneli
   --------------------------------------------------------------------- */
.grille-valeurs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.valeur img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 14px;
}

.valeur p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

/* ---------------------------------------------------------------------
   Applications
   --------------------------------------------------------------------- */
.grille-applis {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.appli {
    display: flex;
    flex-direction: column;
    padding: 36px;
}

.appli .actions { margin-top: auto; }

.appli-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.appli-entete img {
    width: 198px;
    height: auto;
}

.pastille-etat {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--vert-doux);
    color: var(--green-texte);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.pastille-etat::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 1px;
}

.appli > p { color: var(--muted); }

.etiquettes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 28px;
    padding: 0;
    list-style: none;
}

.etiquettes li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--tag-fond);
    color: var(--tag-texte);
    font-size: 0.88rem;
    font-weight: 600;
}

.appli-bientot {
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    border: 2px dashed var(--border-champ);
    box-shadow: none;
}

.appli-bientot .actions { margin-top: 8px; justify-content: center; }

.appli-bientot-koala {
    width: 96px;
    margin-bottom: 16px;
    filter: grayscale(0.15);
    opacity: 0.95;
}

/* ---------------------------------------------------------------------
   Page d'une application (koloc.php) : en-tête centré, puis la vidéo
   --------------------------------------------------------------------- */
.page-appli { padding-top: 40px; }

.page-appli h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }

.page-appli .section-entete .actions {
    justify-content: center;
    margin-top: 28px;
}

/* Vidéo de présentation, sous l'en-tête de la page de l'application. */
.video-presentation {
    max-width: 1040px;
    margin: 0 auto;
}

.video-presentation video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--ombre-forte);
}

.video-presentation figcaption {
    margin-top: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------------
   Koloc : logo et captures (téléphones)
   --------------------------------------------------------------------- */
.koloc-logo {
    width: 198px;
    margin-bottom: 18px;
}

.capture { display: block; width: 100%; height: auto; }

/* Une capture claire et une sombre : le thème du site choisit. */
.capture-sombre { display: none; }
html[data-theme="sombre"] .capture-clair { display: none; }
html[data-theme="sombre"] .capture-sombre { display: block; }

/* ---------------------------------------------------------------------
   Koloc : fonctions
   --------------------------------------------------------------------- */
.grille-fonctions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.fonction {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: border-color .15s ease, transform .15s ease;
}

.fonction:hover {
    border-color: var(--orange-halo);
    transform: translateY(-2px);
}

.fonction img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.fonction h3 { margin-bottom: 4px; font-size: 1.08rem; }

.fonction p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

/* ---------------------------------------------------------------------
   Koloc : sur téléphone
   --------------------------------------------------------------------- */
.poche {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 56px;
    margin-top: 96px;
    padding: 56px;
    border-radius: var(--radius-lg);
    background: var(--orange-doux);
}

.poche h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }

.poche-texte > p:not(.surtitre) { color: var(--text); }

.liste-coches {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
}

.liste-coches li::before {
    background: var(--orange);
    color: var(--sur-orange);
}

.poche-telephones {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.telephone {
    position: relative;
    width: 46%;
    max-width: 230px;
    overflow: hidden;
    /* Barre d'état au-dessus de la capture, de la couleur de l'en-tête de
       Koloc : l'encoche s'y loge sans cacher l'écran. */
    padding-top: 26px;
    border: 9px solid var(--cadre-telephone);
    border-radius: 38px;
    background: var(--card);
    box-shadow: var(--ombre-forte);
}

/* Encoche du téléphone. */
.telephone::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    z-index: 1;
    width: 32%;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: var(--cadre-telephone);
}

.telephone .capture { border-radius: 0 0 29px 29px; }

.telephone-gauche { transform: rotate(-4deg) translateY(-12px); }
.telephone-droite { transform: rotate(4deg) translateY(18px); }

/* ---------------------------------------------------------------------
   Koloc : étapes et appel
   --------------------------------------------------------------------- */
.etapes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: etape;
}

.etape {
    position: relative;
    counter-increment: etape;
    text-align: center;
    padding-top: 40px;
}

.etape::before {
    content: counter(etape);
    position: absolute;
    top: -18px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--orange);
    color: var(--sur-orange);
    font-family: var(--police-titres);
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 0 0 5px var(--bg);
}

.etape h3 { font-size: 1.08rem; }

.etape img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 12px;
}

.etape p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.appel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 88px;
    padding: 44px 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #FD8C01, #FFA733);
    color: #031939;
    box-shadow: var(--shadow-card);
}

.appel h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; }

.appel p { margin: 0; max-width: 560px; }

.appel .actions { flex-shrink: 0; }

/* Sur l'orange, les boutons passent en bleu nuit et en blanc (mêmes
   couleurs dans les deux thèmes). */
.appel .btn {
    background: #031939;
    border-color: #031939;
    color: #FFFFFF;
}

.appel .btn:hover { background: #0B2A52; border-color: #0B2A52; }

.appel .btn.secondaire {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #031939;
}

.appel .btn.secondaire:hover { background: #FFF4E6; border-color: #FFF4E6; }

/* ---------------------------------------------------------------------
   Koloc : questions fréquentes (une question par <details>, ouverte au clic)
   --------------------------------------------------------------------- */
.faq {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.faq-question {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: border-color .15s ease;
}

.faq-question:hover,
.faq-question[open] { border-color: var(--orange-halo); }

.faq-question summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    list-style: none;
    cursor: pointer;
}

.faq-question summary::-webkit-details-marker { display: none; }

.faq-question summary h3 {
    margin: 0;
    font-size: 1.08rem;
}

/* Signe + qui devient − à l'ouverture. */
.faq-question summary::after {
    content: "+";
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}

.faq-question[open] summary::after { content: "−"; }

.faq-question p {
    margin: 0;
    padding: 0 22px 20px;
    color: var(--muted);
}

/* ---------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------- */
.contact-grille {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: start;
}

.contact-texte > p:not(.surtitre) { color: var(--muted); font-size: 1.12rem; }

.contact-illustration {
    width: 96px;
    margin-top: 12px;
    transform: rotate(-6deg);
}

.contact-carte { padding: 32px; }

.formulaire { display: grid; gap: 18px; }

.champs-deux {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.champ { display: grid; gap: 6px; }

.champ label { font-weight: 700; font-size: 0.97rem; }

.champ input,
.champ select,
.champ textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-champ);
    border-radius: var(--radius-sm);
    background: var(--champ-fond);
    color: var(--text);
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.champ textarea { resize: vertical; min-height: 150px; }

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
    outline: none;
    border-color: var(--orange-contour);
    box-shadow: 0 0 0 3px var(--orange-halo);
}

.champ [aria-invalid="true"],
.champ [aria-invalid="true"]:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--rouge-doux);
}

.erreur-champ {
    margin: 0;
    color: var(--red);
    font-size: 0.92rem;
    font-weight: 600;
}

.alerte {
    margin: 0;
    padding: 12px 16px;
    border-left: 4px solid var(--red);
    border-radius: var(--radius-sm);
    background: var(--rouge-doux);
    color: var(--text);
}

/* Champ piège : hors de l'écran (pas display: none, que certains robots
   savent repérer). */
.champ-piege {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.formulaire-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mention {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.formulaire-pied .btn { flex-shrink: 0; }

.message-succes { text-align: center; padding: 24px 8px; }

.message-succes:focus { outline: none; }

.message-succes h3 { color: var(--green-texte); }

.message-succes h3::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--vert-doux);
    font-size: 1.6rem;
}

.message-succes p { color: var(--muted); }

/* ---------------------------------------------------------------------
   Pages de texte (mentions légales, confidentialité)
   --------------------------------------------------------------------- */
/* Même largeur que les autres pages (celle de .conteneur). */
.page-texte {
    padding-top: 56px;
    padding-bottom: 88px;
}

.page-texte h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }

.page-texte .chapo { margin-bottom: 36px; }

/* Mentions légales, confidentialité : tout le texte sur une seule feuille,
   les parties séparées par un trait fin (et non une carte chacune). */
/* Fond entre la carte (blanc) et la page (crème), plus proche du crème ;
   de même en mode sombre. */
.carte.document {
    background: color-mix(in srgb, var(--card) 30%, var(--bg));
    padding: 44px 48px;
}

.document-partie > :last-child { margin-bottom: 0; }

.document-partie + .document-partie {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.sommaire {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.sommaire-titre {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sommaire ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sommaire a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.sommaire a:hover { background: var(--orange-doux-survol); }

.mise-a-jour { color: var(--muted); font-size: 0.92rem; }

.document .mise-a-jour {
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.page-texte h2 { font-size: 1.35rem; margin-bottom: 10px; }

.page-texte p,
.page-texte li { color: var(--text); }

.page-texte ul { padding-left: 1.2em; }

.page-texte li { margin-bottom: 6px; }

.fiche {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 8px 20px;
    margin: 0;
}

.fiche dt { color: var(--muted); font-weight: 600; }
.fiche dd { margin: 0; }

.a-completer {
    padding: 1px 8px;
    border-radius: 6px;
    background: var(--rouge-doux);
    color: var(--red);
    font-weight: 700;
    font-size: 0.9rem;
}

.retour { display: inline-block; margin-bottom: 20px; font-weight: 600; }

/* ---------------------------------------------------------------------
   Guides de la colocation (guides.php et un fichier par guide). La page
   garde la largeur du site ; le texte d'un guide tient dans une colonne
   plus étroite, plus confortable à lire.
   --------------------------------------------------------------------- */
.grille-guides {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.guide-carte {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transition: border-color .15s ease, transform .15s ease;
}

.guide-carte:hover {
    border-color: var(--orange-halo);
    transform: translateY(-2px);
}

.guide-carte h2 { margin: 0; font-size: 1.3rem; }
.guide-carte h2 a { color: var(--text); text-decoration: none; }

/* Toute la carte est cliquable. */
.guide-carte h2 a::after { content: ""; position: absolute; inset: 0; }

.guide-carte p { margin: 0; color: var(--muted); }

.guide-carte h3 { margin: 0; font-size: 1.2rem; }
.guide-carte h3 a { color: var(--text); text-decoration: none; }
.guide-carte h3 a::after { content: ""; position: absolute; inset: 0; }

/* Sommaire des guides : un bloc par thème. */
.theme-guides + .theme-guides { margin-top: 56px; }

.theme-guides-entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 20px;
}

.theme-guides-entete h2 { margin: 0; font-size: 1.6rem; }
.theme-guides-entete h2 a { color: var(--text); text-decoration: none; }
.theme-guides-entete h2 a:hover { color: var(--orange-texte); }
.theme-guides-tous { font-weight: 600; }

.guide-infos { color: var(--muted); font-size: 0.92rem; }

.guide-entete,
.guide-corps,
.guide-koloc,
.guide-autres {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.guide-entete img { display: block; width: 64px; margin-bottom: 12px; }
.guide-entete .chapo { margin-bottom: 10px; }
.guide-entete .guide-infos { margin: 0 0 36px; }

.guide-corps h2 { margin-top: 44px; font-size: 1.5rem; }
.guide-corps h3 { margin: 26px 0 8px; font-size: 1.15rem; }
.guide-corps p,
.guide-corps li { line-height: 1.7; }

.guide-sommaire {
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.guide-sommaire p { margin: 0 0 8px; }
.guide-sommaire ol { margin: 0; padding-left: 1.3em; }
.guide-sommaire li { margin-bottom: 4px; }

.guide-etapes li { margin-bottom: 12px; }

.guide-formule {
    padding: 16px 20px;
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-sm);
    background: var(--orange-doux);
    color: var(--orange-doux-texte);
    font-weight: 700;
}

/* Tableaux des exemples : défilent sur eux-mêmes sur un écran étroit. */
.tableau-defilant {
    overflow-x: auto;
    margin: 16px 0 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
}

.tableau-defilant table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.tableau-defilant th,
.tableau-defilant td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border-soft);
    white-space: nowrap;
}

/* Première colonne (noms, méthodes) : à gauche, et peut aller à la ligne. */
.tableau-defilant th:first-child,
.tableau-defilant td:first-child { text-align: left; white-space: normal; }

.tableau-defilant thead th {
    background: var(--card-alt);
    font-size: 0.88rem;
    color: var(--muted);
}

.tableau-defilant tbody tr:last-child > * { border-bottom: none; }

.guide-koloc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 56px;
    padding: 28px;
    border: 1px solid var(--orange-halo);
    border-radius: var(--radius);
    background: var(--orange-doux);
}

.guide-koloc img { width: 150px; }
.guide-koloc p { margin: 0; color: var(--text); }

.guide-autres { margin-top: 40px; }
.guide-autres h2 { font-size: 1.2rem; }

/* Page Koloc : liens vers les guides, sous les questions fréquentes. */
.guides-lies {
    max-width: 860px;
    margin: 40px auto 0;
    text-align: center;
}

.guides-lies h2 { font-size: 1.2rem; margin-bottom: 10px; }

.guides-lies ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Page introuvable (404.php) */
.introuvable { text-align: center; }
.introuvable > img { width: 120px; margin: 0 auto 16px; }
.introuvable .chapo { margin-left: auto; margin-right: auto; }
.introuvable .actions { justify-content: center; }

/* ---------------------------------------------------------------------
   Pied de page
   --------------------------------------------------------------------- */
.pied {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 36px 0;
}

.pied-interieur {
    display: grid;
    grid-template-columns: 1.3fr 3fr;
    align-items: start;
    gap: 28px 40px;
}

.pied-marque {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pied-marque img { width: 64px; height: auto; }

.pied-marque p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

.pied-marque strong { color: var(--text); font-family: var(--police-titres); font-size: 1.05rem; }

/* Trois colonnes de liens : applications, guides, à propos. */
.pied-colonnes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 32px;
}

.pied-titre {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pied-colonne ul { margin: 0; padding: 0; list-style: none; }
.pied-colonne li { margin-bottom: 8px; }
.pied-colonne a { color: var(--text); font-weight: 600; text-decoration: none; }
.pied-colonne a:hover { color: var(--orange-texte); text-decoration: underline; }

.pied-copyright {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ---------------------------------------------------------------------
   Écrans moyens et petits
   --------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .pied-interieur { grid-template-columns: 1fr; }
    .grille-guides { grid-template-columns: 1fr; }
    .grille-valeurs { grid-template-columns: repeat(2, 1fr); }
    .poche { grid-template-columns: 1fr; padding: 44px 32px; gap: 48px; }
    .appel { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 860px) {
    .section { padding: 72px 0; }
    .page-appli { padding-top: 28px; }
    .hero { padding: 40px 0 64px; }
    .hero-grille { grid-template-columns: 1fr; gap: 24px; }
    .hero-visuel { order: -1; }
    .hero-logo { max-width: 300px; }
    .grille-applis { grid-template-columns: 1fr; }
    .grille-fonctions { grid-template-columns: 1fr; }
    .etapes { grid-template-columns: 1fr; gap: 36px; }
    .contact-grille { grid-template-columns: 1fr; gap: 28px; }
    .contact-illustration { display: none; }
    .sous-titre-section { margin-top: 72px; }
}

@media (max-width: 720px) {
    .entete-lien { padding: 8px 10px; }
    .menu-applis .menu-liste { left: auto; right: -60px; }
    .entete-interieur { gap: 12px; min-height: 64px; }
    .entete-logo img { height: 46px; }
    .entete-contact { margin-left: 0; }
    html { scroll-padding-top: 76px; }
}

/* Marges réduites sur les petits écrans. */
@media (max-width: 680px) {
    .conteneur { padding: 0 16px; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .chapo { font-size: 1.08rem; }
    .grille-valeurs { grid-template-columns: 1fr; }
    .carte { padding: 22px; }
    .appli { padding: 26px 22px; }
    .appli-entete img { width: 160px; }
    .champs-deux { grid-template-columns: 1fr; }
    .formulaire-pied { flex-direction: column; align-items: stretch; }
    .contact-carte { padding: 22px; }
    .poche { padding: 32px 20px; margin-left: -4px; margin-right: -4px; }
    .poche-telephones { gap: 14px; }
    .telephone { padding-top: 16px; border-width: 6px; border-radius: 28px; }
    .telephone .capture { border-radius: 0 0 22px 22px; }
    .telephone::before { top: 3px; height: 10px; }
    .appel { padding: 32px 22px; }
    .actions .btn { flex: 1 1 auto; }
    .carte.document { padding: 26px 20px; }
    .fiche { grid-template-columns: 1fr; gap: 2px; }
    .fiche dd { margin-bottom: 10px; }
    .pied-interieur { grid-template-columns: 1fr; }
    .pied-colonnes { grid-template-columns: 1fr 1fr; }
}

/* Trop étroit pour le lien Guides : il reste dans le pied de page et sur
   la page Koloc. */
@media (max-width: 600px) {
    .entete-guides { display: none; }
    .tableau-defilant th,
    .tableau-defilant td { padding: 8px 8px; font-size: 0.92rem; }
}

/* Trop étroit pour le logo, le menu, Contact et les boutons : le lien
   Contact reste dans le pied de page. */
@media (max-width: 480px) {
    .entete-contact { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
