/* Le tableau de bord de Synaps Statistiques, posé sur les fondations des
   interfaces Synaps (/moteur/fondations.css : le papier, l'orange, Newsreader
   pour les titres, Archivo pour le reste, les trois plans et leurs ombres).

   Les trois niveaux, comme dans le chat :
   1. le fond (papier) : la phrase « en bref », les titres de section ;
   2. les cartes posées (surface, ombre 1) : ce qu'on lit et qu'on peut
      toucher — une ligne cliquable se met en retrait au survol ;
   3. le levé (ombre 2-3) : seulement ce qui s'ouvre par-dessus (le panneau
      de l'assistant, une bulle).

   Un seul orange par écran qui appelle : « Poser une question ». Le reste de
   l'orange porte les données (la courbe, les barres). */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--anneau); outline-offset: 2px; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
.evitement { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--surface); border-radius: var(--r-controle); box-shadow: var(--ombre-2); color: var(--texte); }
.evitement:focus { top: 12px; }

/* ---------- les boutons (repris du chat) ---------- */
.bouton { font: inherit; font-size: var(--t-courant); font-weight: 650; line-height: 1; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-controle); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s var(--courbe), box-shadow .15s var(--courbe), background-color .15s, border-color .15s, color .15s; }
.bouton--primaire { background: var(--orange); color: #fff; box-shadow: var(--ombre-1); }
.bouton--primaire:hover { background: var(--orange-fonce); transform: translateY(-1px); box-shadow: var(--ombre-2); }
.bouton--primaire:active { transform: none; box-shadow: none; }
.bouton--secondaire { background: var(--surface); color: var(--texte); border-color: var(--trait-fort); box-shadow: var(--ombre-1); }
.bouton--secondaire:hover { border-color: var(--texte); transform: translateY(-1px); box-shadow: var(--ombre-2); }
.bouton--tertiaire { background: transparent; color: var(--texte-2); padding: 0 12px; }
.bouton--tertiaire:hover { color: var(--texte); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- l'en-tête ---------- */
.tete { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 14px; padding: 10px max(24px, calc((100vw - 1132px) / 2)); background: rgba(244, 241, 233, .92); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--trait); }
.marque { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .2em; font-size: 12px; flex: none; }
.marque::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--orange); }
.tete__site { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: 21px; line-height: 1.2; padding-left: 14px; border-left: 1px solid var(--trait-fort); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.direct { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-petit); color: var(--texte-2); white-space: nowrap; }
.direct i { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 0 rgba(47, 107, 58, .45); animation: battement 2.4s ease-out infinite; }
@keyframes battement { 0% { box-shadow: 0 0 0 0 rgba(47, 107, 58, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 107, 58, 0); } }
.direct--vide i { background: var(--texte-3); animation: none; }
.tete__demander { margin-left: auto; transition: opacity .2s; }
/* l'assistant ouvert : le bouton passe en retrait et propose de le fermer (panneau.js) */
.tete__demander-fermer { display: none; }
.tete__demander[aria-expanded="true"] { background: var(--surface); color: var(--texte); border-color: var(--trait-fort); box-shadow: none; }
.tete__demander[aria-expanded="true"]:hover { background: var(--retrait); border-color: var(--texte); box-shadow: none; }
.tete__demander[aria-expanded="true"] .tete__demander-bulle { display: none; }
.tete__demander[aria-expanded="true"] .tete__demander-fermer { display: block; }

/* les deux vues d'un même site : le point (des phrases), tous les chiffres */
.vues { display: inline-flex; flex: none; gap: 2px; padding: 3px; background: var(--retrait); border-radius: 11px; }
.vues a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 650; color: var(--texte-2); text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
.vues a:hover { color: var(--texte); background: rgba(255, 253, 249, .55); }
.vues a[aria-current="page"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1), 0 1px 3px rgba(20, 17, 15, .08); }
/* un lien du point vise une carte : son titre ne se cache pas sous l'en-tête */
.carte__tete h2, .section-titre { scroll-margin-top: 170px; }

/* ---------- la période et les filtres : une rangée, au-dessus de tout ---------- */
.reglages { position: sticky; top: var(--haut-tete, 61px); z-index: 11; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px max(24px, calc((100vw - 1132px) / 2)) 12px; background: rgba(244, 241, 233, .92); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
.periodes { display: inline-flex; gap: 2px; padding: 4px; background: var(--retrait); border-radius: 12px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.periodes::-webkit-scrollbar { display: none; }
.periodes button { font: inherit; font-size: 14px; font-weight: 650; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--texte-2); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.periodes button:hover { color: var(--texte); background: rgba(255, 253, 249, .55); }
.periodes button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1), 0 1px 3px rgba(20, 17, 15, .08); }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtre { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 6px 0 14px; font-size: 14px; color: var(--orange-fonce); background: var(--orange-doux); border: 1px solid rgba(195, 65, 17, .3); border-radius: 999px; animation: entre var(--duree) var(--courbe); }
.filtre b { font-weight: 650; color: var(--texte); }
.filtre button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--orange-fonce); font-size: 18px; line-height: 1; cursor: pointer; }
.filtre button:hover { background: rgba(195, 65, 17, .14); }
.dates { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-carte); box-shadow: var(--ombre-2); animation: entre var(--duree) var(--courbe); }
.dates[hidden] { display: none; }
.dates label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--texte-2); }
.dates input { font: inherit; font-size: 15px; min-height: 44px; padding: 0 10px; color: var(--texte); background: var(--surface); border: 1px solid var(--trait-fort); border-radius: var(--r-controle); }
.dates input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-doux); }
@keyframes entre { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- la page ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 8px 24px 56px; transition: opacity .2s; }
.page--charge { opacity: .55; pointer-events: none; }
.demo { margin: 6px 0 0; padding: 10px 14px; font-size: var(--t-petit); color: var(--texte-2); background: var(--retrait); border-radius: var(--r-controle); }
.demo b { color: var(--orange-fonce); }

/* en bref : la phrase que l'on lit d'abord, posée sur le fond */
.bref { margin: 26px 0 22px; }
.bref__phrase { margin: 0; max-width: 46rem; font-family: var(--police-titre); font-weight: 600; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.22; letter-spacing: -.005em; color: var(--texte); text-wrap: pretty; }
.bref__phrase b { font-weight: 700; background: linear-gradient(to top, var(--orange-doux) 34%, transparent 34%); padding: 0 2px; }
.bref__phrase .bas, .bref__phrase .haut { white-space: nowrap; }

/* ---------- les tuiles : quatre chiffres, chacun choisit la courbe ---------- */
.tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tuile { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; align-items: end; gap: 2px 10px; min-height: 128px; padding: 16px 18px 14px; text-align: left; font: inherit; color: var(--texte); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-carte); box-shadow: var(--ombre-1); cursor: pointer; transition: transform .18s var(--courbe), box-shadow .18s var(--courbe), border-color .15s; }
.tuile:hover { transform: translateY(-2px); box-shadow: var(--ombre-2); border-color: var(--trait-fort); }
.tuile[aria-pressed="true"] { border-color: rgba(195, 65, 17, .55); box-shadow: 0 0 0 3px var(--orange-doux), var(--ombre-1); }
.tuile[aria-pressed="true"]::after { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }
.tuile__nom { grid-column: 1 / -1; align-self: start; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; color: var(--texte-2); }
.tuile__valeur { font-size: clamp(28px, 3vw, 36px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin-top: 10px; }
.tuile__valeur small { font-size: .5em; font-weight: 650; letter-spacing: 0; color: var(--texte-2); margin-left: 2px; }
.tuile .etincelle { grid-row: 2; grid-column: 2; align-self: end; }
.tuile__ecart { grid-column: 1 / -1; font-size: var(--t-petit); color: var(--texte-3); font-variant-numeric: tabular-nums; }
.ecart { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.ecart--haut { color: var(--vert); background: var(--vert-doux); }
.ecart--bas { color: var(--rouge); background: #F7E3DF; }
.ecart--stable { color: var(--texte-2); background: var(--retrait); }

/* l'aide d'un mot : un « ? » discret, une bulle au survol ou au toucher */
.aide { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid var(--trait-fort); border-radius: 50%; background: transparent; color: var(--texte-3); font: inherit; font-size: 11px; font-weight: 800; line-height: 1; cursor: help; flex: none; }
.aide:hover, .aide:focus-visible { color: var(--texte); border-color: var(--texte-2); }
.bulle-aide { position: fixed; z-index: 40; max-width: 280px; padding: 10px 12px; font-size: var(--t-petit); line-height: 1.45; color: var(--texte); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-controle); box-shadow: var(--ombre-3); pointer-events: none; }

/* ---------- les cartes ---------- */
/* chaque carte garde sa hauteur : une courte ne s'étire pas à côté de la longue liste des pubs */
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; margin-bottom: 18px; }
.carte { min-width: 0; padding: 20px 22px 18px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-carte); box-shadow: var(--ombre-1); }
.carte--large { margin-bottom: 18px; }
.carte__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 12px; }
.carte__tete h2, .section-titre { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: var(--t-titre-2); line-height: 1.2; letter-spacing: -.005em; }
.carte__dit { margin: -4px 0 14px; font-size: var(--t-courant); color: var(--texte-2); }
.vide { margin: 4px 0; padding: 16px; font-size: var(--t-courant); color: var(--texte-3); background: var(--retrait); border-radius: var(--r-controle); }

/* « Demander » : la question préparée, envoyée à l'assistant */
.demander { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--texte-2); background: transparent; border: 1px solid var(--trait); border-radius: 999px; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.demander::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat; }
.demander:hover { color: var(--orange-fonce); border-color: rgba(195, 65, 17, .4); background: var(--orange-doux); }

/* la légende de la courbe : un trait par série, jamais une boîte */
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--t-petit); color: var(--texte-2); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.legende i { width: 16px; height: 0; border-top: 2px solid var(--orange); border-radius: 2px; }
.legende .legende__avant i { border-top-color: rgba(107, 99, 90, .55); }
.legende .legende__partiel i { border-top-style: dotted; }

.chiffres-bruts { margin-top: 8px; font-size: var(--t-petit); color: var(--texte-3); }
.chiffres-bruts summary { cursor: pointer; display: inline-flex; min-height: 36px; align-items: center; font-weight: 650; color: var(--texte-2); }
.chiffres-bruts table { width: 100%; max-width: 560px; border-collapse: collapse; font-variant-numeric: tabular-nums; color: var(--texte-2); }
.chiffres-bruts th, .chiffres-bruts td { text-align: right; padding: 5px 10px; border-bottom: 1px solid var(--trait); }
.chiffres-bruts th:first-child, .chiffres-bruts td:first-child { text-align: left; }
.chiffres-bruts thead th { font-weight: 650; color: var(--texte-3); }

/* ---------- à retenir : des phrases, chacune ouvre son filtre ---------- */
.retenir { margin: 26px 0 22px; }
.retenir .section-titre { margin-bottom: 12px; }
.retenir__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.fait { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 14px 16px; font-size: var(--t-courant); line-height: 1.45; color: var(--texte); background: var(--retrait); border-radius: var(--r-carte); }
.fait b { font-weight: 700; }
.fait__signe { flex: none; width: 24px; height: 24px; display: grid; place-items: center; margin-top: 1px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.fait--bon .fait__signe { background: var(--vert-doux); color: var(--vert); }
.fait--attention .fait__signe { background: var(--orange-doux); color: var(--orange-fonce); }
.fait--neutre .fait__signe { background: var(--fond); color: var(--texte-2); }
.fait__corps { display: grid; gap: 6px; }
.fait__voir { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--texte-2); background: none; border: 0; cursor: pointer; }
.fait__voir::after { content: "→"; transition: transform .18s var(--courbe); }
.fait__voir:hover { color: var(--texte); text-decoration: underline; text-underline-offset: 4px; }
.fait__voir:hover::after { transform: translateX(3px); }

/* ---------- les onglets d'une carte ---------- */
.onglets { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; background: var(--retrait); border-radius: 11px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.onglets button { font: inherit; font-size: 13.5px; font-weight: 650; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--texte-3); cursor: pointer; white-space: nowrap; }
.onglets button:hover { color: var(--texte); }
.onglets button[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1); }

/* ---------- les lignes : nom, chiffres, barre ---------- */
.lignes { list-style: none; margin: 0; padding: 0; display: grid; }
/* les pubs moins utiles à suivre, repliées sous celles qui comptent (moteur/pertinence.mjs) */
.autres-pubs { margin-top: 4px; }
.autres-pubs summary { cursor: pointer; display: inline-flex; min-height: 36px; align-items: center; gap: 8px; list-style: none; font-size: var(--t-petit); font-weight: 650; color: var(--orange); }
.autres-pubs summary::-webkit-details-marker { display: none; }
.autres-pubs summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.autres-pubs[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.ligne { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom chiffres" "barre barre"; align-items: center; gap: 6px 14px; padding: 9px 10px 11px; margin: 0 -10px; border-radius: var(--r-controle); }
.ligne[role="button"] { cursor: pointer; transition: background-color .15s; }
.ligne[role="button"]:hover { background: var(--retrait); }
.ligne[role="button"]:hover .ligne__nom > span { text-decoration: underline; text-decoration-color: var(--trait-fort); text-underline-offset: 3px; }
.ligne__nom { grid-area: nom; min-width: 0; display: flex; align-items: center; gap: 7px; font-size: var(--t-courant); font-weight: 600; color: var(--texte); }
.ligne__nom > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne__nom small { display: block; font-size: 12px; font-weight: 500; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne__nom .bloc { display: grid; min-width: 0; }
.ligne__nom .bloc > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne__chiffres { grid-area: chiffres; display: inline-flex; align-items: baseline; gap: 14px; font-size: var(--t-courant); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ligne__chiffres b { font-weight: 700; color: var(--texte); }
.ligne__chiffres .secondaire { font-size: var(--t-petit); color: var(--texte-3); }
.ligne__chiffres .contacts { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-petit); font-weight: 650; color: var(--texte-2); }
.ligne__chiffres .contacts--zero { color: var(--texte-3); font-weight: 500; }
.ligne__barre { grid-area: barre; height: 8px; background: var(--retrait); border-radius: 4px; overflow: hidden; }
.ligne__barre i { display: block; height: 100%; min-width: 3px; background: var(--orange); border-radius: 4px; opacity: .85; }
.ligne__barre i.contact { background: var(--orange-fonce); opacity: 1; }
.entete-lignes { display: flex; justify-content: flex-end; gap: 14px; margin: -4px 0 2px; font-size: 12px; font-weight: 650; color: var(--texte-3); }
.entete-lignes > * { font-weight: 650; }
/* les colonnes : mêmes largeurs dans l'en-tête et dans chaque ligne */
.ligne__chiffres > b, .entete-lignes > b { min-width: 64px; text-align: right; }
.ligne__chiffres .secondaire, .entete-lignes .secondaire { min-width: 68px; text-align: right; }
.entete-lignes .contacts, .ligne__chiffres .contacts { min-width: 84px; justify-content: flex-end; text-align: right; }
.plus { margin-top: 6px; }

/* ---------- les contacts ---------- */
.contacts-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.contact { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 12px 14px; text-align: left; font: inherit; color: var(--texte); background: var(--fond); border: 1px solid transparent; border-radius: var(--r-carte); cursor: pointer; transition: background-color .15s, border-color .15s; }
.contact:hover { background: var(--retrait); border-color: var(--trait); }
.contact__icone { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--orange-doux); color: var(--orange-fonce); }
.contact__nom { font-size: 13.5px; font-weight: 650; color: var(--texte-2); }
.contact__valeur { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.contact__valeur .ecart { font-size: 12px; letter-spacing: 0; }
.sous-titre { margin: 4px 0 6px; font-size: var(--t-petit); font-weight: 700; color: var(--texte-2); }

/* ---------- qui : la ville, l'appareil ---------- */
.qui-grille { display: grid; gap: 18px; }

/* ---------- la courbe du tableau ---------- */
.courbe-boite { position: relative; min-height: 260px; }
/* ---------- le pied ---------- */
.pied { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--trait); font-size: var(--t-petit); color: var(--texte-3); }
.pied p { margin: 0 0 6px; max-width: 46rem; }
.pied a { color: var(--texte-2); }

/* ---------- l'assistant : une fenêtre au-dessus de la page (panneau.js) ----------
   Comme « Mon site » dans l'interface de modification de site : sur ordinateur, une
   fenêtre flottante (l'ombre la plus forte) qu'on déplace par sa barre et qu'on agrandit
   par son coin, la page utilisable à côté ; sur téléphone, un panneau qui monte du bas. */
.assistant { position: fixed; z-index: 30; display: flex; flex-direction: column; overflow: hidden; background: var(--fond); border: 1px solid var(--trait-fort); border-radius: 20px; box-shadow: var(--ombre-3), 0 30px 70px -24px rgba(20, 17, 15, .28); transition: opacity 220ms var(--courbe), transform 220ms var(--courbe); }
.assistant[hidden] { display: none; }
.assistant--fenetre { transform-origin: top right; }
.assistant--fenetre.assistant--hors { opacity: 0; transform: translateY(10px) scale(.97); }
/* ouverte d'office au chargement : elle est là, sans entrer */
.assistant--sans-mouvement { transition: none; }
/* pendant qu'on tire, rien n'amortit le geste et le chat ne prend pas le pointeur */
.assistant--tire { transition: none; user-select: none; }
.assistant--tire .assistant__cadre { pointer-events: none; }
.assistant__poignee { display: none; }
.assistant__barre { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--trait); cursor: grab; touch-action: none; user-select: none; }
.assistant--tire .assistant__barre { cursor: grabbing; }
.assistant__titre { min-width: 0; flex: 1; font-family: var(--police-titre); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assistant__fermer { flex: none; width: 36px; height: 36px; font: inherit; font-size: 17px; color: var(--texte-2); background: none; border: 0; border-radius: var(--r-controle); cursor: pointer; }
.assistant__fermer:hover { color: var(--texte); background: var(--retrait); }
.assistant__cadre { flex: 1; min-height: 0; }
.assistant__cadre iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--fond); }
/* le coin : on tire pour agrandir */
.assistant__coin { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, var(--trait-fort) 50%, var(--trait-fort) 58%, transparent 58%, transparent 70%, var(--trait-fort) 70%, var(--trait-fort) 78%, transparent 78%); border-bottom-right-radius: 20px; }
/* téléphone : un panneau qui monte du bas, qu'on baisse du doigt pour le fermer */
.assistant--feuille { left: 0; right: 0; top: 8dvh; bottom: 0; border-width: 1px 0 0; border-radius: 20px 20px 0 0; }
.assistant--feuille.assistant--hors { transform: translateY(100%); }
.assistant--feuille .assistant__coin { display: none; }
.assistant--feuille .assistant__poignee { display: block; flex: none; height: 18px; touch-action: none; cursor: grab; }
.assistant--feuille .assistant__poignee::before { content: ""; display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 999px; background: var(--trait-fort); }
.assistant--feuille .assistant__barre { padding: 0 8px 6px 16px; }
body.avec-feuille { overflow: hidden; }
/* collée au bord droit d'un grand écran : la page se range à sa gauche, rien n'est caché dessous
   (l'en-tête garde toute sa largeur : la fenêtre commence sous lui) */
body.assistant-range .tete { padding-left: max(24px, calc((100vw - var(--place-assistant) - 1132px) / 2)); }
body.assistant-range .reglages { padding-right: calc(var(--place-assistant) + 24px); padding-left: max(24px, calc((100vw - var(--place-assistant) - 1132px) / 2)); }
body.assistant-range .page { margin-right: var(--place-assistant); margin-left: max(0px, calc((100vw - var(--place-assistant) - 1180px) / 2)); }
.voile { position: fixed; inset: 0; z-index: 29; background: rgba(20, 17, 15, .28); animation: apparait-voile .2s; }
.voile[hidden] { display: none; }
@keyframes apparait-voile { from { opacity: 0; } }

/* ---------- les pages seules (lien refusé, bienvenue) ---------- */
body.seul { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.seul__corps { max-width: 30rem; }
.seul__corps .marque { margin: 0 0 22px; }
.seul__corps h1 { font-family: var(--police-titre); font-weight: 600; font-size: var(--t-titre-1); line-height: 1.05; margin: 0 0 12px; }
.seul__corps p { font-size: 18px; color: var(--texte-2); }

/* ---------- les écrans moyens et le téléphone ---------- */
@media (max-width: 1080px) {
  .tuiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grille { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* sans flou ici : un filtre sur l'en-tête y retiendrait le bouton flottant */
  .tete { gap: 8px; padding: 10px 12px 10px 14px; background: var(--fond); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .marque__mot { display: none; }
  .marque { gap: 0; }
  .tete__site { font-size: 18px; padding-left: 10px; }
  .tete--vues .tete__site { display: none; }
  .vues a { padding: 0 11px; }
  .direct { display: none; }
  .tete__demander { position: fixed; z-index: 15; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); min-height: 52px; padding: 0 18px; border-radius: 999px; box-shadow: var(--ombre-3); }
  .reglages { padding: 8px 12px 10px; gap: 8px; }
  .periodes { flex: 1 1 100%; }
  .periodes button { padding: 0 12px; }
  .page { padding: 4px 14px 96px; }
  .bref { margin: 18px 0 16px; }
  .tuiles { gap: 10px; }
  .tuile { min-height: 112px; padding: 13px 14px 12px; }
  .tuile .etincelle { display: none; }
  .tuile   .tuile__nom { font-size: 13px; }
  .carte { padding: 16px 14px 14px; border-radius: 14px; }
  .carte__tete h2, .section-titre { font-size: 21px; }
  .demander { min-height: 36px; padding: 0 10px; font-size: 0; gap: 0; }
  .demander::before { width: 16px; height: 16px; }
  .ligne { margin: 0 -6px; padding: 9px 6px 11px; }
  .ligne__chiffres { gap: 10px; }
  .ligne__chiffres > b, .entete-lignes > b { min-width: 44px; }
  .ligne__chiffres .contacts, .entete-lignes .contacts { min-width: 70px; }
  .ligne__chiffres .secondaire, .entete-lignes .secondaire { display: none; }
  .chaleur { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .chaleur > i { min-height: 10px; aspect-ratio: .9; border-radius: 2px; }
  .chaleur__h { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
