/* ==========================================================================
   CARexplorer — pages intérieures du design « La Nuit », version 1
   Composants communs à toutes les pages hors accueil et chat : structure de page, fil d'Ariane,
   titres, cartes, grilles, texte long, formulaires, messages, tableaux, pagination, états vides.
   Dépend de tokens.css, motion.css et cx.css. Aucune couleur, aucun arrondi, aucune durée en dur.
   Ces écrans ne sont pas dans design/reference/ : ils sont construits avec les composants du design
   system, en suivant design/DESIGN.md (section 11), et restent à faire valider.
   ========================================================================== */

/* ---------- Structure d'une page ---------- */
.cx-page { padding-bottom: var(--cx-e-module); }
.cx-conteneur--lecture { max-width: calc(var(--cx-l-conversation) + 2 * var(--cx-e-6)); }
.cx-conteneur--moyen { max-width: calc(1040px + 2 * var(--cx-e-6)); }

/* Fil d'Ariane : du texte discret, le dernier élément est la page en cours. */
.cx-ariane { padding-top: var(--cx-e-5); }
.cx-ariane ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cx-e-1) var(--cx-e-2); margin: 0; padding: 0; list-style: none; font: var(--cx-t-detail); color: var(--cx-legende); }
.cx-ariane li { display: flex; align-items: center; gap: var(--cx-e-2); min-width: 0; }
.cx-ariane li + li::before { content: "/"; color: var(--cx-gris-repere); }
.cx-ariane a { display: inline-flex; align-items: center; min-height: 28px; color: var(--cx-brume); }
.cx-ariane a:hover { color: var(--cx-lune); }
.cx-ariane [aria-current] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 48ch; color: var(--cx-legende); }

/* En-tête de page : un surtitre facultatif, le titre (le seul h1), un chapeau, des actions. */
.cx-titre-page { padding: var(--cx-e-6) 0 var(--cx-e-7); }
.cx-titre-page--serre { padding-bottom: var(--cx-e-6); }
.cx-titre-page__sur { display: block; margin-bottom: var(--cx-e-3); font: var(--cx-t-etiquette); color: var(--cx-legende); }
.cx-titre-page h1 { max-width: 22ch; text-wrap: balance; font: var(--cx-t-grand-titre); letter-spacing: var(--cx-interlettrage-grand-titre); color: var(--cx-lune); }
.cx-titre-page--long h1 { max-width: 28ch; }
.cx-titre-page__chapeau { margin-top: var(--cx-e-4) !important; max-width: 720px; font: var(--cx-t-texte); color: var(--cx-brume); }
.cx-titre-page__faits { display: flex; flex-wrap: wrap; gap: var(--cx-e-1) var(--cx-e-4); margin-top: var(--cx-e-4) !important; font: var(--cx-t-detail); color: var(--cx-legende); }
.cx-titre-page__actions { display: flex; flex-wrap: wrap; gap: var(--cx-e-2); margin-top: var(--cx-e-5); }
.cx-titre-page--centre { text-align: center; }
.cx-titre-page--centre h1, .cx-titre-page--centre .cx-titre-page__chapeau { margin-left: auto !important; margin-right: auto !important; }

/* Titre de section (h2) : identique aux modules de l'accueil, avec moins d'air entre deux sections. */
.cx-module--serre { padding-bottom: var(--cx-e-8); }
.cx-titre-section { font: var(--cx-t-titre); letter-spacing: var(--cx-interlettrage-titre); color: var(--cx-lune); text-wrap: balance; }
.cx-titre-section + .cx-sous-titre { margin-top: 6px !important; }
.cx-sous-titre { font: var(--cx-t-texte-s); color: var(--cx-brume); }
.cx-titre-bloc { font: var(--cx-t-question); color: var(--cx-lune); }

/* ---------- Boutons, liens d'action, pastilles de filtre ---------- */
.cx .cx-bouton--principal { background: var(--cx-bleu); color: var(--cx-sur-bleu); }
.cx .cx-bouton--principal:hover { background: var(--cx-bleu-survol); }
.cx .cx-bouton[disabled], .cx .cx-bouton[aria-disabled="true"] { background: var(--cx-surface-haute); color: var(--cx-gris-icone); box-shadow: none; cursor: default; }
.cx button.cx-bouton--discret { background: transparent; color: var(--cx-lune); }
.cx button.cx-bouton--discret:hover { background: var(--cx-surface); }
.cx-bouton--plein { width: 100%; }
.cx-lien-action { display: inline-flex; align-items: center; gap: 6px; min-height: var(--cx-cible); font: var(--cx-t-interface); white-space: nowrap; }
.cx .cx-lien-action { color: var(--cx-bleu-doux-texte); }
.cx-lien-action svg { transition: transform var(--cx-d-survol) var(--cx-courbe); }
.cx-lien-action:hover svg { transform: translateX(3px); }
.cx .cx-lien-texte { color: var(--cx-bleu-doux-texte); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-gris-repere); }
.cx .cx-lien-texte:hover { text-decoration-color: currentColor; }

/* Filtres : une rangée de pastilles qui défile si elle déborde ; la pastille active est claire. */
.cx-filtres { display: flex; gap: var(--cx-e-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--cx-e-6) * -1); padding: var(--cx-e-1) var(--cx-e-6); }
.cx-filtres::-webkit-scrollbar { display: none; }
.cx-filtres > * { flex: 0 0 auto; }
.cx .cx-pastille[aria-current] { background: var(--cx-lune); color: var(--cx-nuit); box-shadow: none; }
.cx-etiquette--info { background: var(--cx-surface-haute); color: var(--cx-lune); }
.cx-etiquette--defaut { background: var(--cx-defaut-fond); color: var(--cx-defaut); }

/* Onglets d'un espace (compte, espace professionnel) : du texte souligné, comme le menu. */
.cx-onglets { display: flex; gap: var(--cx-e-5); overflow-x: auto; scrollbar-width: none; border-bottom: var(--cx-trait) solid var(--cx-filet); }
.cx-onglets::-webkit-scrollbar { display: none; }
.cx-onglets a { position: relative; display: flex; align-items: center; gap: var(--cx-e-2); flex: 0 0 auto; height: 48px; font: var(--cx-t-interface); color: var(--cx-brume); white-space: nowrap; transition: color var(--cx-d-etat); }
.cx-onglets a:hover, .cx .cx-onglets a[aria-current] { color: var(--cx-lune); }
.cx-onglets a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--cx-trait-selection); border-radius: 2px 2px 0 0; background: var(--cx-bleu); }

/* ---------- Cartes et grilles ---------- */
.cx-grille { display: grid; gap: var(--cx-e-3); }
.cx-grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cx-grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cx-grille--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cx-grille--auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cx-grille--large { gap: var(--cx-e-5); }

.cx-carte { display: block; padding: 20px; border-radius: var(--cx-r-carte); background: var(--cx-surface); }
.cx-carte--serree { padding: var(--cx-e-4); }
.cx a.cx-carte { transition: background var(--cx-d-etat); }
.cx a.cx-carte:hover { background: var(--cx-surface-haute); }
.cx-carte__titre { font: var(--cx-t-titre-carte); color: var(--cx-lune); }
.cx-carte__texte { margin-top: var(--cx-e-1) !important; font: var(--cx-t-detail); color: var(--cx-brume); }
.cx-carte__pied { display: flex; align-items: center; justify-content: space-between; gap: var(--cx-e-2); margin-top: var(--cx-e-3); font: var(--cx-t-legende); color: var(--cx-legende); }

/* Carte à photo (article, annonce, professionnel) : toute la carte est un lien. */
.cx-carte-photo { display: flex; flex-direction: column; padding: var(--cx-e-2); border-radius: var(--cx-r-carte); background: var(--cx-surface); transition: background var(--cx-d-etat); }
.cx a.cx-carte-photo:hover { background: var(--cx-surface-haute); }
.cx-carte-photo__image { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--cx-r-photo); background: var(--cx-relief); }
.cx-carte-photo__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--cx-d-zoom-photo) var(--cx-courbe); }
a.cx-carte-photo:hover .cx-carte-photo__image img { transform: scale(1.04); }
.cx-carte-photo__image--vide { display: flex; align-items: center; justify-content: center; }
.cx-carte-photo__image--vide .cx-symbole { background: var(--cx-gris-repere); }
.cx-carte-photo__corps { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px var(--cx-e-2) var(--cx-e-2); }
.cx-carte-photo__sur { display: flex; flex-wrap: wrap; gap: var(--cx-e-1) var(--cx-e-2); font: var(--cx-t-legende); color: var(--cx-legende); }
.cx-carte-photo h3 { margin-top: 6px; font: var(--cx-t-titre-carte); color: var(--cx-lune); text-wrap: balance; }
.cx-carte-photo__texte { margin-top: 6px !important; font: var(--cx-t-detail); color: var(--cx-brume); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.cx-carte-photo__pied { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cx-e-2); margin-top: auto; padding-top: 14px; font: var(--cx-t-legende); color: var(--cx-legende); }

/* Mise en avant : une grande image et son texte, dans un panneau. */
.cx-vedette-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--cx-e-5); padding: var(--cx-e-3); border-radius: var(--cx-r-champ); background: var(--cx-surface); transition: background var(--cx-d-etat); }
.cx a.cx-vedette-page:hover { background: var(--cx-surface-haute); }
.cx-vedette-page__image { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--cx-r-puce); background: var(--cx-relief); }
.cx-vedette-page__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--cx-d-zoom-photo) var(--cx-courbe); }
a.cx-vedette-page:hover .cx-vedette-page__image img { transform: scale(1.04); }
.cx-vedette-page__corps { display: flex; flex-direction: column; justify-content: center; padding: var(--cx-e-4) var(--cx-e-5) var(--cx-e-4) 0; min-width: 0; }
.cx-vedette-page h2 { margin-top: var(--cx-e-3); font: var(--cx-t-titre); letter-spacing: var(--cx-interlettrage-titre); color: var(--cx-lune); text-wrap: balance; }
.cx-vedette-page__texte { margin-top: var(--cx-e-3) !important; font: var(--cx-t-texte); color: var(--cx-brume); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.cx-vedette-page__pied { margin-top: var(--cx-e-4); font: var(--cx-t-legende); color: var(--cx-legende); }

/* Liste à filets : des lignes de liens, sans cadre (rubriques, articles liés, résultats simples). */
.cx-liste { display: grid; grid-template-columns: minmax(0, 1fr); }
.cx-liste--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--cx-e-7); }
.cx-liste--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--cx-e-7); }
.cx-liste__ligne { display: flex; align-items: center; justify-content: space-between; gap: var(--cx-e-4); min-height: 64px; padding: var(--cx-e-3) 0; border-top: var(--cx-trait) solid var(--cx-filet); }
.cx-liste__ligne > span:first-child { min-width: 0; }
.cx-liste__ligne b { display: block; font: var(--cx-t-titre-carte); color: var(--cx-lune); }
.cx-liste__ligne small { display: block; margin-top: 2px; font: var(--cx-t-detail); color: var(--cx-brume); }
.cx-liste__ligne > svg, .cx-liste__ligne > .cx-legende { flex: 0 0 auto; color: var(--cx-legende); white-space: nowrap; }
a.cx-liste__ligne:hover b { text-decoration: underline; text-decoration-color: var(--cx-gris-repere); text-underline-offset: 3px; }
a.cx-liste__ligne svg { transition: transform var(--cx-d-survol) var(--cx-courbe); }
a.cx-liste__ligne:hover svg { transform: translateX(3px); color: var(--cx-lune); }

/* Faits : des paires libellé / valeur (fiche technique, annonce, coordonnées). */
.cx-faits { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--cx-trait); margin: 0; overflow: hidden; border-radius: var(--cx-r-carte); background: var(--cx-filet); }
.cx-faits > div { padding: 14px var(--cx-e-4); background: var(--cx-surface); }
.cx-faits dt { font: var(--cx-t-legende); color: var(--cx-legende); }
.cx-faits dd { margin: 2px 0 0; font: var(--cx-t-titre-carte-s); color: var(--cx-lune); overflow-wrap: anywhere; }
.cx-faits--lignes { display: block; border-radius: 0; background: none; }
.cx-faits--lignes > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cx-e-4); padding: var(--cx-e-3) 0; border-top: var(--cx-trait) solid var(--cx-filet); background: none; }
.cx-faits--lignes dt { font: var(--cx-t-texte-s); color: var(--cx-brume); }
.cx-faits--lignes dd { margin: 0; text-align: right; }

/* ---------- Appel à la recherche par IA : une phrase et un champ, entre deux filets ---------- */
.cx-appel-ia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center; gap: var(--cx-e-7); padding: 40px 0; border-top: var(--cx-trait) solid var(--cx-filet); border-bottom: var(--cx-trait) solid var(--cx-filet); }
.cx-appel-ia__texte { display: flex; gap: var(--cx-e-4); align-items: flex-start; }
.cx-appel-ia__texte h2 { font: var(--cx-t-titre); letter-spacing: var(--cx-interlettrage-titre); color: var(--cx-lune); text-wrap: balance; }
.cx-appel-ia__texte p { margin-top: 6px !important; font: var(--cx-t-texte-s); color: var(--cx-brume); }
.cx-recherche-ligne { display: block; padding: var(--cx-trait-selection); border-radius: calc(var(--cx-r-champ) + var(--cx-trait-selection)); }
.cx-recherche-ligne:focus-within { background: var(--cx-degrade-ciel); }
.cx-recherche-ligne__boite { display: flex; align-items: center; gap: var(--cx-e-1); height: 56px; padding: 0 6px 0 20px; border-radius: var(--cx-r-champ); background: var(--cx-surface); box-shadow: inset 0 0 0 var(--cx-trait) var(--cx-contour); }
.cx-recherche-ligne:focus-within .cx-recherche-ligne__boite { box-shadow: none; }
.cx-recherche-ligne input { flex: 1 1 auto; min-width: 0; height: var(--cx-cible); padding: 0; border: 0; outline: 0; background: transparent; color: var(--cx-lune); font: var(--cx-t-texte); }
.cx .cx-recherche-ligne input:focus-visible { outline: 0; }
.cx-recherche-ligne input::placeholder { color: var(--cx-legende); opacity: 1; }
.cx-recherche-ligne input:not(:placeholder-shown) ~ .cx-envoi { background: var(--cx-bleu); color: var(--cx-sur-bleu); }
.cx-recherche-ligne input:not(:placeholder-shown) ~ .cx-envoi:hover { background: var(--cx-bleu-survol); }

/* ---------- Texte long (article, page d'information) ---------- */
.cx-prose { font: var(--cx-t-texte); color: var(--cx-brume-claire); overflow-wrap: break-word; }
/* « .cx p » remet les marges à zéro (cx.css) : ces règles doivent peser plus lourd. */
.cx .cx-prose > * + * { margin-top: var(--cx-e-4); }
.cx .cx-prose h2 { margin-top: var(--cx-e-7); font: var(--cx-t-titre); letter-spacing: var(--cx-interlettrage-titre); color: var(--cx-lune); text-wrap: balance; scroll-margin-top: var(--cx-e-5); }
.cx .cx-prose h3 { margin-top: var(--cx-e-6); font: var(--cx-t-question); color: var(--cx-lune); }
.cx-prose h4 { margin: var(--cx-e-5) 0 0; font: var(--cx-t-titre-carte); color: var(--cx-lune); }
.cx .cx-prose > :first-child { margin-top: 0; }
.cx-prose strong, .cx-prose b { font-weight: 600; color: var(--cx-lune); }
.cx .cx-prose a { color: var(--cx-bleu-doux-texte); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-gris-repere); }
.cx .cx-prose a:hover { text-decoration-color: currentColor; }
.cx-prose ul, .cx-prose ol { margin-bottom: 0; padding-left: 22px; }
.cx-prose li + li { margin-top: var(--cx-e-2); }
.cx-prose li::marker { color: var(--cx-gris-icone); }
.cx-prose blockquote { margin-left: 0; margin-right: 0; padding: var(--cx-e-4) 20px; border-radius: var(--cx-r-carte); background: var(--cx-surface); color: var(--cx-lune); }
.cx-prose img { height: auto; border-radius: var(--cx-r-carte); }
.cx-prose figure { margin-left: 0; margin-right: 0; }
.cx-prose figcaption { margin-top: var(--cx-e-2); font: var(--cx-t-legende); color: var(--cx-legende); }
.cx-prose hr { height: var(--cx-trait); border: 0; background: var(--cx-filet); }
.cx-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font: var(--cx-t-texte-s); }
.cx-prose th, .cx-prose td { padding: var(--cx-e-3) var(--cx-e-4) var(--cx-e-3) 0; border-bottom: var(--cx-trait) solid var(--cx-filet); text-align: left; vertical-align: top; }
.cx-prose th { font: var(--cx-t-etiquette); color: var(--cx-legende); white-space: nowrap; }
.cx-prose td { color: var(--cx-lune); }
.cx .cx-prose details { border-top: var(--cx-trait) solid var(--cx-filet); margin-top: 0; }
.cx .cx-prose .faq-list { margin-top: var(--cx-e-4); }
.cx-prose details:last-child { border-bottom: var(--cx-trait) solid var(--cx-filet); }
.cx-prose summary { display: flex; align-items: center; justify-content: space-between; gap: var(--cx-e-5); min-height: 64px; cursor: pointer; list-style: none; font: var(--cx-t-question); color: var(--cx-lune); }
.cx-prose summary::-webkit-details-marker { display: none; }
.cx-prose summary::after { content: ""; flex: 0 0 12px; width: 12px; height: 12px; background: linear-gradient(var(--cx-brume), var(--cx-brume)) center / 12px 1.8px no-repeat, linear-gradient(var(--cx-brume), var(--cx-brume)) center / 1.8px 12px no-repeat; transition: transform var(--cx-d-survol) var(--cx-courbe); }
.cx-prose details[open] summary::after { transform: rotate(45deg); }
.cx-prose details > div, .cx-prose details > p { padding: 0 0 var(--cx-e-5); }
.cx-prose__chapeau { font: var(--cx-t-saisie); color: var(--cx-lune); }

/* ---------- Formulaires ---------- */
.cx-formulaire { display: grid; gap: 20px; }
.cx-formulaire__rangee { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cx-e-4); }
.cx-champ-texte { display: block; min-width: 0; }
.cx-champ-texte > label, .cx-champ-texte > .cx-champ-texte__libelle { display: block; margin-bottom: 6px; font: 600 13px/18px var(--cx-police-texte); color: var(--cx-brume); }
.cx-champ-texte input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .cx-champ-texte select, .cx-champ-texte textarea {
  display: block; width: 100%; min-height: 48px; padding: var(--cx-e-3) 14px; border: 0; border-radius: var(--cx-r-bascule);
  background: var(--cx-surface); box-shadow: inset 0 0 0 var(--cx-trait) var(--cx-contour);
  color: var(--cx-lune); font: var(--cx-t-texte); transition: box-shadow var(--cx-d-etat);
}
.cx-champ-texte textarea { min-height: 120px; resize: vertical; }
.cx-champ-texte select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--cx-brume) 50%), linear-gradient(135deg, var(--cx-brume) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.cx-champ-texte ::placeholder { color: var(--cx-legende); opacity: 1; }
/* Champ actif : contour bleu de 2 px. Le sélecteur reprend les « :not() » de la règle de base pour peser plus lourd qu'elle. */
.cx .cx-champ-texte input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus-visible, .cx .cx-champ-texte select:focus-visible, .cx .cx-champ-texte textarea:focus-visible { outline: 0; box-shadow: inset 0 0 0 var(--cx-trait-selection) var(--cx-bleu); }
.cx .cx-champ-texte--erreur input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus-visible, .cx .cx-champ-texte--erreur select:focus-visible, .cx .cx-champ-texte--erreur textarea:focus-visible { box-shadow: inset 0 0 0 var(--cx-trait-selection) var(--cx-defaut) !important; }
.cx-champ-texte input:disabled, .cx-champ-texte select:disabled, .cx-champ-texte textarea:disabled { color: var(--cx-gris-icone); background: var(--cx-surface-basse); }
.cx-champ-texte--erreur input, .cx-champ-texte--erreur select, .cx-champ-texte--erreur textarea { box-shadow: inset 0 0 0 var(--cx-trait) var(--cx-defaut) !important; }
.cx-champ-texte__aide { display: block; margin-top: 6px; font: var(--cx-t-legende); color: var(--cx-legende); }
.cx-champ-texte__erreur { display: block; margin-top: 6px; font: var(--cx-t-detail); color: var(--cx-defaut); }
.cx-case { display: flex; align-items: flex-start; gap: var(--cx-e-3); min-height: var(--cx-cible); padding: 10px 0; font: var(--cx-t-texte-s); color: var(--cx-brume); cursor: pointer; }
.cx-case input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--cx-bleu); color-scheme: dark; }
.cx-formulaire__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cx-e-3); }

/* ---------- Messages : un constat, dit sans détour ; jamais la couleur seule ---------- */
.cx-message { display: flex; gap: var(--cx-e-3); align-items: flex-start; padding: var(--cx-e-3) var(--cx-e-4); border-radius: var(--cx-r-bascule); background: var(--cx-surface); font: 400 14px/22px var(--cx-police-texte); color: var(--cx-lune); }
.cx-message > svg { flex: 0 0 auto; margin-top: 2px; color: var(--cx-brume); }
.cx-message--succes { background: var(--cx-atout-fond); }
.cx-message--succes > svg { color: var(--cx-atout); }
.cx-message--vigilance { background: var(--cx-vigilance-fond); color: var(--cx-vigilance-texte); }
.cx-message--vigilance > svg { color: var(--cx-vigilance); }
.cx-message--defaut { background: var(--cx-defaut-fond); }
.cx-message--defaut > svg { color: var(--cx-defaut); }
.cx-message ul { margin: 0; padding-left: 18px; }

/* ---------- Tableau ---------- */
.cx-tableau-zone { position: relative; overflow-x: auto; }   /* relative : un texte pour lecteur d'écran dans un tableau qui défile n'élargit pas la page */
.cx-tableau { width: 100%; border-collapse: collapse; font: var(--cx-t-texte-s); }
.cx-tableau th, .cx-tableau td { height: 48px; padding: var(--cx-e-2) var(--cx-e-4) var(--cx-e-2) 0; border-bottom: var(--cx-trait) solid var(--cx-filet); text-align: left; vertical-align: middle; }
.cx-tableau th { font: var(--cx-t-etiquette); color: var(--cx-legende); white-space: nowrap; }
.cx-tableau td { color: var(--cx-lune); }
.cx-tableau th:last-child, .cx-tableau td:last-child { padding-right: 0; }
.cx-tableau .cx-tableau__nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-tableau tbody tr:hover td { background: var(--cx-surface-basse); }
.cx .cx-tableau a { color: var(--cx-lune); font-weight: 600; }
.cx .cx-tableau a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pagination ---------- */
.cx-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--cx-e-1); margin-top: var(--cx-e-7); }
.cx-pagination a, .cx-pagination span { display: flex; align-items: center; justify-content: center; min-width: var(--cx-cible); height: var(--cx-cible); padding: 0 var(--cx-e-3); border-radius: var(--cx-r-puce); font: var(--cx-t-interface); color: var(--cx-brume); }
.cx-pagination a:hover { background: var(--cx-surface); color: var(--cx-lune); }
.cx .cx-pagination [aria-current] { background: var(--cx-lune); color: var(--cx-nuit); }
.cx-pagination [aria-disabled="true"] { color: var(--cx-gris-repere); }
.cx-pagination__saut { min-width: 0 !important; padding: 0 !important; color: var(--cx-gris-icone) !important; }

/* ---------- État vide : un constat, une piste, un bouton ---------- */
.cx-vide { display: flex; flex-direction: column; align-items: flex-start; gap: var(--cx-e-3); padding: var(--cx-e-7) 0; }
.cx-vide h2, .cx-vide h3 { font: var(--cx-t-titre); letter-spacing: var(--cx-interlettrage-titre); color: var(--cx-lune); }
.cx-vide p { max-width: 560px; font: var(--cx-t-texte); color: var(--cx-brume); }
.cx-vide .cx-bouton { margin-top: var(--cx-e-2); }
.cx-vide--centre { align-items: center; text-align: center; padding: var(--cx-e-module) 0; }

/* Deux colonnes : le contenu et une colonne d'appoint qui reste visible pendant la lecture. */
.cx-deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--cx-e-8); align-items: start; }
.cx-appoint { position: sticky; top: var(--cx-e-5); display: grid; gap: var(--cx-e-5); }
.cx-appoint__titre { margin-bottom: var(--cx-e-2) !important; font: var(--cx-t-etiquette); color: var(--cx-legende); }
.cx-appoint__liens a { display: flex; align-items: center; min-height: 36px; padding: 6px 0; font: var(--cx-t-texte-s); color: var(--cx-brume); }
.cx-appoint__liens a:hover { color: var(--cx-lune); }

/* ==========================================================================
   Adaptation aux écrans (à faire valider : aucune de ces pages n'est dessinée)
   ========================================================================== */
@media (max-width: 1023px) {
  .cx-grille--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-grille--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-liste--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-appel-ia { grid-template-columns: minmax(0, 1fr); gap: var(--cx-e-5); }
  .cx-deux-colonnes { grid-template-columns: minmax(0, 1fr); gap: var(--cx-e-7); }
  .cx-appoint { position: static; }
  .cx-vedette-page { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cx-vedette-page__corps { padding: var(--cx-e-4) var(--cx-e-2) var(--cx-e-2); }
}
@media (max-width: 767px) {
  .cx-page { padding-bottom: var(--cx-e-8); }
  .cx-titre-page { padding: var(--cx-e-5) 0 var(--cx-e-6); }
  .cx-titre-page h1 { font-size: 28px; line-height: 36px; }
  .cx-ariane [aria-current] { max-width: 24ch; }
  .cx-grille--2, .cx-grille--3, .cx-grille--4, .cx-liste--2, .cx-liste--3, .cx-formulaire__rangee { grid-template-columns: minmax(0, 1fr); }
  .cx-grille--auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-filtres { margin: 0 calc(var(--cx-e-4) * -1); padding: var(--cx-e-1) var(--cx-e-4); }
  .cx-prose h2 { margin-top: var(--cx-e-6); }
  .cx-appel-ia { padding: var(--cx-e-6) 0; }
  .cx-faits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-vide--centre { padding: var(--cx-e-8) 0; }
}
