/* Kuittly — HABILLAGE (version 2, 27.11.2026 : « même en-tête et même pied partout »).
   Barre du haut (logo, parties de l'accueil, Guides, Comparer, loupe, clair / sombre, langue, Mon compte, menu ☰) et pied,
   identiques sur le site et le comparateur. Plus : variables de couleurs (clair / sombre), police Outfit, ligne des catégories.
   Règles de la barre et du pied reprises telles quelles de site.css (même ordre), qui ne les a plus.
   Chargé AVANT site.css (site) ou base.css + comparer.css (comparateur). Aucun mouvement sur les boutons. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/outfit-500.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/outfit-600.woff2") format("woff2"); }

:root {
  --bg: #F5F5F7; --surface: #FFFFFF; --surface2: #EEEEF2; --divider: #E5E4EA;
  --text: #15141A; --text2: #5E5C67; --text3: #8C8A96; --placeholder: #6E6C77;
  --accent: #6C5CE7; --accent-fort: #5546D6; --accent-text: #5546D6; --on-accent: #FFFFFF; --tonal: #EFEDFD;
  --late: #C62828; --paid: #0F7B5F; --paid-bg: #E6F4EF; --due: #9C5400; /* P10 (24.11.2026) : plus foncé que le site (#A75A00) pour un contraste ≥ 4,5 sur le fond violet clair */
  --r: 12px; --r-sm: 8px;
  --font: "Outfit", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Fond des cartes avec 0 d'opacité : pour les dégradés (Safari passe par du gris avec « transparent »). */
  --surface-0: rgba(255, 255, 255, 0);
  /* Hauteur de la barre du haut collée (60 px + bordure ; 56 + 1 au téléphone). Le site et le comparateur se règlent dessus. */
  --haut-barre: 61px;
  color-scheme: light dark;
}
@media (max-width: 640px) { :root { --haut-barre: 57px; } }
/* Sombre : réglage de l'appareil (sauf si le visiteur a choisi « Clair »), ou choix « Sombre » avec le bouton ☀ / ☾.
   data-theme sur <html>, posé par le petit script de <head> (clé « kuittly-theme »). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E12; --surface: #18181F; --surface2: #22222B; --divider: #2A2A33;
    --text: #F3F3F6; --text2: #A6A5B1; --text3: #75737F; --placeholder: #86848F;
    --accent-text: #8F84F0; --tonal: #26233F;
    --late: #FF6B6B; --paid: #2FBF8F; --paid-bg: #14271F; --due: #F5A524;
    --surface-0: rgba(24, 24, 31, 0);
  }
}
:root[data-theme="dark"] {
    --bg: #0E0E12; --surface: #18181F; --surface2: #22222B; --divider: #2A2A33;
    --text: #F3F3F6; --text2: #A6A5B1; --text3: #75737F; --placeholder: #86848F;
    --accent-text: #8F84F0; --tonal: #26233F;
    --late: #FF6B6B; --paid: #2FBF8F; --paid-bg: #14271F; --due: #F5A524;
    --surface-0: rgba(24, 24, 31, 0);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
/* Texte lu par les lecteurs d'écran seulement */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ===== Barre du haut et pied (repris de site.css) ===== */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
/* Barre du haut */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--divider); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 20px; }
.brand img { width: 32px; height: 32px; }
.sections { display: none; align-items: center; gap: 24px; margin-left: 16px; }
.sections a, .more summary { color: var(--text2); text-decoration: none; font-size: 15px; font-weight: 500; }
.sections a:hover, .more summary:hover { color: var(--text); }
.sections > a[aria-current], .more summary.on { color: var(--accent-text); }
/* 25.11.2026 : liens des sections seulement quand ils tiennent (mesuré dans les 18 langues) ; sinon menu ☰. Tamoul plus long. */
@media (min-width: 1180px) {
  .sections { display: flex; }
}
@media (min-width: 1180px) and (max-width: 1519px) {
  html[lang="ta"] .sections { display: none; }
}
.sections > a { white-space: nowrap; }
@media (max-width: 1023px) {
  html[lang="ta"] .sections { gap: 16px; }
}
/* « Plus ▾ » : les sections qui ne tiennent pas dans l'en-tête */
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; white-space: nowrap; }
.more summary::-webkit-details-marker { display: none; }
.more ul { position: absolute; right: -12px; top: calc(100% + 14px); list-style: none; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 6px; min-width: 220px; }
.more li a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); white-space: nowrap; }
.more li a:hover { background: var(--surface2); }
.more li a[aria-current] { color: var(--accent-text); background: var(--tonal); }
/* Bouton menu ☰ (sous 900 px) et son panneau : toutes les sections + les langues */
.menu { display: none; }
@media (max-width: 1179px) {
  .menu { display: block; }
}
@media (min-width: 1180px) and (max-width: 1519px) {
  html[lang="ta"] .menu { display: block; }
}
.menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface2); color: var(--text); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.menu .i-close, .menu[open] .i-open { display: none; }
.menu[open] .i-close { display: block; }
.menu-panel { position: fixed; left: 0; right: 0; top: var(--haut-barre); max-height: calc(100vh - var(--haut-barre)); overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--divider); z-index: 6; }
.js .menu-panel { bottom: 0; max-height: none; overflow: hidden; display: flex; flex-direction: column; background: rgba(14, 14, 18, 0.45); border: 0; }
.menu-sheet { background: var(--surface); padding: 8px 16px 20px; overflow-y: auto; min-height: 0; border-bottom: 1px solid var(--divider); }
.menu-secs ul { list-style: none; display: flex; flex-direction: column; }
.menu-secs li + li { border-top: 1px solid var(--divider); }
.menu-secs a { display: flex; align-items: center; min-height: 52px; padding: 0 12px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 500; border-radius: var(--r-sm); }
.menu-secs a:hover { background: var(--surface2); }
.menu-secs a[aria-current] { color: var(--accent-text); background: var(--tonal); }
/* Langue sur téléphone : une ligne « Langue : Français ▾ ». Avec JS : <select> natif invisible posé sur la ligne. Sans JS : <details> + liens. */
.lang-pick { margin-top: 12px; }
.foot-pick, .lp-js { display: none; }
.lp-js { position: relative; }
.js .lp-js { display: block; }
.js .lp-nojs { display: none; }
.lp-face, .lp-nojs summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface2); color: var(--text); font-size: 16px; }
.lp-face svg, .lp-nojs summary svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.lp-l { color: var(--text2); white-space: nowrap; }
.lang-pick b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-v { margin-left: auto; color: var(--text2); }
.lp-sel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; font-size: 16px; }
.lp-js:focus-within .lp-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp-nojs summary { list-style: none; cursor: pointer; }
.lp-nojs summary::-webkit-details-marker { display: none; }
.lp-nojs[open] .lp-v { transform: rotate(180deg); }
.menu-langs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.menu-langs a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; }
.menu-langs a[aria-current] { background: var(--tonal); color: var(--accent-text); font-weight: 600; }
@media (max-width: 899px) {
  .js .foot-pick { display: block; order: -1; margin: 0 0 20px; max-width: 480px; }
  .js footer .lang-list, .js footer .lang-head { display: none; }
}
.menu-open body { overflow: hidden; }
.langs { margin-left: auto; position: relative; }
.langs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 40px; border-radius: var(--r-sm); background: var(--surface2); color: var(--text); font-size: 14px; font-weight: 500; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); padding: 6px; width: 220px; max-height: 70vh; overflow-y: auto; }
.langs li a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-size: 15px; }
.langs li a:hover { background: var(--surface2); }
.langs li a[aria-current] { color: var(--accent-text); font-weight: 600; background: var(--tonal); }
/* Pied de page */
footer { border-top: 1px solid var(--divider); padding: 32px 0 40px; margin-top: 24px; font-size: 14px; color: var(--text2); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
footer .links a { color: var(--text); text-decoration: none; }
footer .links a:hover { text-decoration: underline; }
footer .lang-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 16px 0; }
footer .lang-list a { color: var(--text2); text-decoration: none; }
footer .lang-list a:hover { color: var(--text); }
footer .lang-head { display: none; }
@media (max-width: 640px) {
  /* En-tête : menu des langues */
  .top .wrap { gap: 8px; min-height: 56px; }
  .langs { margin-left: 0; }
  /* Pied de page : la liste des langues d'abord, en pastilles */
  footer { margin-top: 0; padding: 24px 0 32px; }
  footer .wrap { display: flex; flex-direction: column; }
  footer .lang-head { display: block; order: -1; font-weight: 500; color: var(--text); margin-bottom: 8px; }
  footer .lang-list { order: -1; gap: 6px; margin: 0 0 20px; }
  footer .lang-list a { padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 500; }
}
.top { transition: background-color .25s, box-shadow .25s, border-color .25s; }
/* Bouton clair / sombre : ordinateur dans l'en-tête, téléphone dans le menu ☰ (rien sans JavaScript) */
.theme-pick, .menu-theme { display: none; }
.theme-pick button, .mt-seg button { border: 0; cursor: pointer; font: inherit; color: var(--text2); background: transparent; }
.theme-pick svg, .mt-seg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.theme-pick svg.moon, .mt-seg svg.moon { fill: currentColor; }
@media (min-width: 900px) {
  .js .theme-pick { display: inline-flex; margin-left: auto; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface2); }
  .js .theme-pick + .langs { margin-left: 0; }
  .theme-pick button { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; transition: background-color .2s, color .2s; }
  .theme-pick button:hover { color: var(--text); }
  .theme-pick button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
}
@media (max-width: 899px) {
  .js .menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 4px; }
  .mt-l { color: var(--text2); font-size: 15px; }
  .mt-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface2); }
  .mt-seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 500; }
  .mt-seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
}
/* Guides et Comparer dans la barre : un peu plus foncés que les parties de l'accueil */
.sections > a.sec-guides { color: var(--text); }
footer .tm { font-size: 12px; color: var(--text3); margin-top: 8px; max-width: 720px; }
/* R2 : turc et tamoul, le nom Kuittly ne se serre pas à 360 px */
@media (max-width: 400px) {
  .top .brand { flex: none; }
}
/* Bonus 9 : liens du pied de page plus faciles à toucher */
footer .links a { display: inline-block; padding: 10px 0; }
/* O3 : mention des marques plus lisible */
footer .tm { font-size: 13px; color: var(--text2); }
.top-search { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--text); }
.top-search:hover { background: var(--surface2); }
.top-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 399px) {
  .top-search { display: none; }
}
/* Ordinateur : l'ancien « Plus ▾ » devient l'icône ☰ (25.11.2026), « Confidentialité » en 1re ligne ; zone de 44 px */
.more summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); color: var(--text); }
.more summary:hover, .more[open] summary { background: var(--surface2); }
.more summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.more ul { top: calc(100% + 8px); right: 0; }
@media (min-width: 1024px) {
  .sections { display: flex; gap: 18px; margin-left: 14px; }
  .sections a { font-size: 14.5px; }
  .menu { display: none; }
}
@media (min-width: 1180px) {
  .sections { gap: 22px; }
  .sections a { font-size: 15px; }
}
@media (max-width: 1519px) {
  html[lang="ta"] .sections { display: none; }
  html[lang="ta"] .menu { display: block; }
}
/* Relecture « designer » (25.11.2026) : la barre du haut passe toujours au-dessus des téléphones et de leurs ombres. */
.top { z-index: 10; }
/* En-tête téléphone normal : logo, loupe, langue, ☰ */
@media (max-width: 640px) {
  .top-search { display: inline-flex; margin-left: auto; }
}

/* ===== Ajouts de la version 2 (27.11.2026) ===== */
/* Même largeur de barre et de pied partout (celle du site) : 1080 px, 1360 px dès 1500 px, 1440 px dès 1600 px. */
@media (min-width: 1500px) { .top .wrap, footer .wrap { max-width: 1360px; padding: 0 32px; } }
@media (min-width: 1600px) { .top .wrap, footer .wrap { max-width: 1440px; } }
/* « Vous êtes ici » : la partie où l'on est en violet (Guides, Comparer, Mon compte), les autres en gris ou noir. */
.sections > a.sec-guides[aria-current] { color: var(--accent-text); }
footer .links a[aria-current] { color: var(--accent-text); }
/* « Mon compte » (pages du comparateur) : icône personne comme la loupe ; avec le mot quand le menu complet est affiché.
   Petits téléphones : seulement dans le menu ☰ (comme la loupe). */
.top-compte { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.top-compte:hover { background: var(--surface2); }
.top-compte svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.top-compte span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-compte[aria-current] { color: var(--accent-text); background: var(--tonal); }
@media (min-width: 1440px) { html:not([lang="ta"]) .top-compte { padding: 0 10px; } html:not([lang="ta"]) .top-compte span { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
@media (max-width: 399px) { .top-compte { display: none; } }
/* Page 404 : « Retour au comparateur » (montré par theme.js sur une adresse du comparateur). */
[data-retour-comparateur][hidden] { display: none; }

/* Ligne des catégories du comparateur, sous la barre Kuittly (style inchangé depuis le 23.11.2026).
   Pas collée en haut (la barre Kuittly l'est déjà). Au téléphone, elle défile de côté, dans sa propre boîte (la page ne déborde pas). */
.cats-barre { border-bottom: 1px solid var(--divider); background: var(--bg); }
.cats-barre .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats-barre .wrap::-webkit-scrollbar { display: none; }
.cats-barre a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text2); text-decoration: none; font-size: 0.875rem; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.cats-barre a:first-child { margin-left: -10px; }
.cats-barre a:hover { color: var(--text); }
.cats-barre a[aria-current] { color: var(--accent-text); border-bottom-color: var(--accent); }
.cats-barre a:focus-visible { outline-offset: -2px; }
/* La ligne des catégories montre le survol par le fond (aucun mouvement). */
.cats-barre a:hover { background: var(--surface2); }
