/* ==========================================================================
   ORIGINE IMMOBILIER D'ENTREPRISE — maquette v2 — CSS COMMUN
   Charte : brand book juillet 2026. Fond IVOIRE dominant, textes et logo BLEUS,
   BRONZE pour les accents (filets, actions, motif). Red Hat Display seule famille.
   ⚠️ Fichier partagé : les agents NE LE MODIFIENT PAS. Une classe manque ?
      → l'ajouter dans assets/page-<x>.css de sa page.
   Sommaire : 1 police · 2 jetons · 3 base · 4 typographie · 5 mise en page ·
   6 en-tête · 7 pied · 8 boutons · 9 champs · 10 badges · 11 carte de bien ·
   12 portrait · 13 défilement · 14 hexagones · 15 motif · 16 utilitaires
   ========================================================================== */

/* 1. POLICE ---------------------------------------------------------------- */
@font-face {
  font-family: "Red Hat Display";
  src: url("RedHatDisplay-VariableFont_wght.ttf") format("truetype-variations"),
       url("RedHatDisplay-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* 2. JETONS ---------------------------------------------------------------- */
:root {
  /* Palette officielle */
  --bleu: #062E37;
  --bronze: #A37045;
  --ivoire: #F3F1E8;
  --anthracite: #282828;
  --gris: #D8D8D5;
  --blanc: #FFFFFF;
  /* Dérivés (contrastes AA vérifiés) */
  --bleu-2: #0B4453;          /* survol des aplats bleus */
  --bronze-texte: #8A5D38;    /* bronze pour petit texte / fond de bouton : 5,0:1 sur ivoire, 5,6:1 avec blanc */
  --bronze-fonce: #74492B;    /* survol du bouton bronze */
  --bronze-clair: #C08A5C;    /* bronze lisible sur fond bleu (4,8:1) */
  --ivoire-2: #EAE6D8;        /* section ivoire plus soutenue, champs au repos */
  --ivoire-3: #F8F7F1;        /* surfaces claires posées sur l'ivoire (formulaires) */
  --gris-texte: #5E6668;      /* texte secondaire : 5,2:1 sur ivoire */
  --filet: rgba(6, 46, 55, .14);

  --police: "Red Hat Display", "Helvetica Neue", Arial, sans-serif;

  /* Échelle typographique (base 16 px, rapport ≈ 1,25) */
  --t-xs: .78rem;   /* 12,5 */
  --t-s: .875rem;   /* 14 */
  --t-m: 1rem;      /* 16 */
  --t-l: 1.125rem;  /* 18 — chapô */
  --t-xl: clamp(1.25rem, 1.6vw, 1.4rem);
  --t-2xl: clamp(1.5rem, 2.6vw, 2.1rem);   /* h2 */
  --t-3xl: clamp(2rem, 4.6vw, 3.4rem);     /* h1 */

  /* Espacements */
  --e-1: .25rem; --e-2: .5rem; --e-3: .75rem; --e-4: 1rem; --e-5: 1.5rem;
  --e-6: 2rem; --e-7: 3rem; --e-8: 4.5rem;
  --section: clamp(3.5rem, 8vw, 6.5rem);   /* respiration verticale des sections */

  --largeur: 1240px;
  --gouttiere: 1rem;            /* 16 px de marge latérale minimum (mobile 375) */
  --rayon: 2px;                 /* angles quasi droits : registre architectural */
  --rayon-pastille: 999px;
  --ombre: 0 18px 40px -24px rgba(6, 46, 55, .35);
  --transition: .2s ease;
  --hauteur-entete: 92px;
}

/* 3. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hauteur-entete) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ivoire);
  color: var(--anthracite);
  font-family: var(--police);
  font-size: var(--t-m);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--bleu); text-decoration-color: var(--bronze); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--bronze-texte); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
::selection { background: var(--bronze); color: var(--blanc); }
hr { border: 0; border-top: 1px solid var(--filet); margin: var(--e-6) 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 4. TYPOGRAPHIE ----------------------------------------------------------- */
/* Brand book : titre principal Bold capitales tracking 20 ; sous-titre 1 Medium tracking 10 ;
   sous-titre 2 Medium tracking 5 ; texte courant Regular. */
h1, h2, h3, h4 { color: var(--bleu); margin: 0 0 .5em; line-height: 1.15; }
h1, .h1 { font-size: var(--t-3xl); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.08; }
h2, .h2 { font-size: var(--t-2xl); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
h3, .h3 { font-size: var(--t-xl); font-weight: 500; letter-spacing: .01em; }
h4, .h4 { font-size: var(--t-l); font-weight: 500; letter-spacing: .005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; }
small { font-size: var(--t-s); }

/* Le filet bronze sous les titres : signature du brand book (toutes les pages du livret). */
.titre-filet { position: relative; padding-bottom: .55em; margin-bottom: .9em; }
.titre-filet::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 48px; height: 2px; background: var(--bronze);
}
.texte-centre .titre-filet::after, .titre-filet.texte-centre::after { left: 50%; transform: translateX(-50%); }
.sur-fond-bleu .titre-filet::after { background: var(--bronze-clair); }

/* Chapô : paragraphe d'introduction d'une section */
.chapo { font-size: var(--t-l); line-height: 1.6; color: var(--bleu); max-width: 62ch; }
/* Texte secondaire */
.discret { color: var(--gris-texte); font-size: var(--t-s); }
/* Paragraphe de lecture : longueur de ligne maîtrisée */
.lecture { max-width: 68ch; }
.lecture ul { padding-left: 1.2em; }
.lecture li { margin-bottom: .35em; }
.lecture li::marker { color: var(--bronze); }

/* Lien d'action discret (sans flèche ajoutée) */
.lien-action {
  font-weight: 600; color: var(--bleu); text-decoration: none;
  border-bottom: 1px solid var(--bronze); padding-bottom: 2px; white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.lien-action:hover { color: var(--bronze-texte); border-bottom-width: 2px; }

/* 5. MISE EN PAGE ---------------------------------------------------------- */
.conteneur { width: min(100% - 2 * var(--gouttiere), var(--largeur)); margin-inline: auto; }
.conteneur-etroit { width: min(100% - 2 * var(--gouttiere), 820px); margin-inline: auto; }
@media (min-width: 768px) { :root { --gouttiere: 2rem; } }

.section { padding-block: var(--section); position: relative; }
.section-serree { padding-block: calc(var(--section) * .6); }
.section-ivoire { background: var(--ivoire); }
.section-ivoire-2 { background: var(--ivoire-2); }
.section-blanche { background: var(--blanc); }
.section-bleue, .sur-fond-bleu { background: var(--bleu); color: var(--ivoire); }
.section-bleue h1, .section-bleue h2, .section-bleue h3, .section-bleue h4,
.sur-fond-bleu h1, .sur-fond-bleu h2, .sur-fond-bleu h3, .sur-fond-bleu h4 { color: var(--ivoire); }
.section-bleue a:not(.bouton), .sur-fond-bleu a:not(.bouton) { color: var(--ivoire); }
.section-bleue .discret, .sur-fond-bleu .discret { color: rgba(243, 241, 232, .72); }

/* En-tête de section : titre à gauche, lien d'action à droite */
.section-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--e-4) var(--e-6); flex-wrap: wrap; margin-bottom: var(--e-6); }
.section-tete > :first-child { margin-bottom: 0; }

/* Grilles */
.grille { display: grid; gap: var(--e-6) var(--e-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.grille-2, .grille-3, .grille-4 { display: grid; gap: var(--e-6) var(--e-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grille-2, .grille-3, .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grille-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Deux colonnes asymétriques (contenu + colonne latérale, ex. fiche bien) */
.colonnes { display: grid; gap: var(--e-6); grid-template-columns: 1fr; }
@media (min-width: 960px) { .colonnes { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--e-7); } }

/* Pile : espacement vertical régulier entre enfants */
.pile > * + * { margin-top: var(--e-4); }
.pile-l > * + * { margin-top: var(--e-6); }

/* 6. EN-TÊTE (injecté par entete-pied.js) ---------------------------------- */
.saut { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--bleu); color: var(--ivoire); padding: .7rem 1rem; }
.saut:focus { left: 1rem; top: 1rem; }

.entete {
  position: sticky; top: 0; z-index: 100;
  background: rgba(243, 241, 232, .96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.entete.est-defile { border-bottom-color: var(--filet); }
.entete-barre { display: flex; align-items: center; justify-content: space-between; gap: var(--e-5); min-height: var(--hauteur-entete); }
.entete-logo { display: block; flex: none; padding-block: 12px; }
.entete-logo img { width: 272px; height: auto; }   /* ≈ 61 px de haut (> 60 px de large minimum du brand book) */
.entete-nav { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.6rem); }
.entete-nav a {
  position: relative; padding-block: .5rem;
  color: var(--bleu); text-decoration: none;
  font-size: var(--t-s); font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.entete-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--bronze); transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.entete-nav a:hover::after, .entete-nav a.est-actif::after { transform: scaleX(1); }
.entete-nav a.est-actif { font-weight: 700; }
.entete-burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--filet); background: transparent;
  border-radius: var(--rayon); align-items: center; justify-content: center; color: var(--bleu);
}
.entete-burger svg { width: 22px; height: 22px; }
@media (max-width: 859px) {
  :root { --hauteur-entete: 76px; }
  .entete-logo img { width: 200px; }
  .entete-burger { display: inline-flex; }
  .entete-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivoire); border-bottom: 1px solid var(--filet);
    padding: var(--e-2) var(--gouttiere) var(--e-5);
    display: none;
  }
  .entete.est-ouvert .entete-nav { display: flex; }
  .entete-nav a { padding: var(--e-4) 0; border-bottom: 1px solid var(--filet); font-size: var(--t-m); }
  .entete-nav a::after { display: none; }
  .entete-nav a.est-actif { color: var(--bronze-texte); }
}

/* 7. PIED DE PAGE (injecté par entete-pied.js) ----------------------------- */
.pied { background: var(--bleu); color: var(--ivoire); position: relative; overflow: hidden; isolation: isolate; }
.pied::before { /* arc bronze du monogramme, très grand, en bas à droite */
  content: ""; position: absolute; z-index: -1; right: -180px; bottom: -260px;
  width: 560px; height: 560px; border-radius: 50%;
  border: 64px solid rgba(163, 112, 69, .14); border-left-color: transparent; border-bottom-color: transparent;
  transform: rotate(10deg);
}
.pied a { color: var(--ivoire); text-decoration: none; }
.pied a:hover { color: var(--bronze-clair); }
.pied-haut { display: grid; gap: var(--e-6); padding-block: var(--e-8) var(--e-7); grid-template-columns: 1fr; }
@media (min-width: 768px) { .pied-haut { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.pied-logo img { width: 200px; margin-bottom: var(--e-5); }
.pied-adresse { font-style: normal; line-height: 1.5; }
.pied-raison { max-width: 36ch; color: rgba(243, 241, 232, .82); }
.pied-titre { font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-clair); margin: 0 0 var(--e-4); }
.pied-liste { list-style: none; margin: 0; padding: 0; }
.pied-liste li + li { margin-top: var(--e-2); }
.pied-reseaux { display: flex; gap: var(--e-3); margin-top: var(--e-5); flex-wrap: wrap; }
.pied-reseau {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem .6rem .7rem; border: 1px solid rgba(243, 241, 232, .28); border-radius: var(--rayon-pastille);
  font-size: var(--t-s); font-weight: 500; transition: border-color var(--transition), background var(--transition);
}
.pied-reseau svg { width: 22px; height: 22px; flex: none; }
.pied-reseau:hover { border-color: var(--bronze-clair); background: rgba(243, 241, 232, .06); }
.pied-bas {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e-3) var(--e-5);
  padding-block: var(--e-5); border-top: 1px solid rgba(243, 241, 232, .16);
  font-size: var(--t-xs); color: rgba(243, 241, 232, .7);
}
.pied-bas nav { display: flex; gap: var(--e-5); flex-wrap: wrap; }

/* 8. BOUTONS --------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.6rem;
  border: 1px solid transparent; border-radius: var(--rayon);
  font-size: var(--t-s); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.bouton svg { width: 18px; height: 18px; flex: none; }
.bouton-bronze { background: var(--bronze-texte); color: var(--blanc); }      /* action principale */
.bouton-bronze:hover { background: var(--bronze-fonce); color: var(--blanc); }
.bouton-bleu { background: var(--bleu); color: var(--ivoire); }
.bouton-bleu:hover { background: var(--bleu-2); color: var(--ivoire); }
.bouton-contour { background: transparent; border-color: var(--bleu); color: var(--bleu); }
.bouton-contour:hover { background: var(--bleu); color: var(--ivoire); }
.bouton-clair { background: transparent; border-color: rgba(243, 241, 232, .5); color: var(--ivoire); } /* sur fond bleu */
.bouton-clair:hover { background: var(--ivoire); color: var(--bleu); }
.bouton-large { width: 100%; }
.bouton-petit { min-height: 38px; padding: .45rem 1rem; font-size: var(--t-xs); }
.bouton[disabled], .bouton.est-inactif { opacity: .45; pointer-events: none; }
/* Bouton rond à icône seule (flèches de défilement, fermer…) */
.bouton-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--bleu); background: transparent; color: var(--bleu);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.bouton-icone svg { width: 18px; height: 18px; }
.bouton-icone:hover { background: var(--bleu); color: var(--ivoire); }
.bouton-icone:disabled { opacity: .3; pointer-events: none; }

/* 9. CHAMPS ---------------------------------------------------------------- */
.formulaire { display: grid; gap: var(--e-4); }
.champ { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.champ > label, .champ-libelle { font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu); }
.champ input:not([type=checkbox]):not([type=radio]), .champ select, .champ textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  background: var(--blanc); border: 1px solid var(--gris); border-radius: var(--rayon);
  color: var(--anthracite); font-size: var(--t-m);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.champ textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.champ select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062E37' stroke-width='1.8'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
}
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: rgba(6, 46, 55, .4); }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(163, 112, 69, .25); }
.champ input::placeholder, .champ textarea::placeholder { color: #8A9093; }
.champ-aide { font-size: var(--t-xs); color: var(--gris-texte); }
.champ.est-erreur input, .champ.est-erreur select, .champ.est-erreur textarea { border-color: #A3392B; }
.champ-erreur { font-size: var(--t-xs); color: #A3392B; font-weight: 500; }
/* Case à cocher / bouton radio */
.case { display: flex; align-items: flex-start; gap: .6rem; font-size: var(--t-s); line-height: 1.45; cursor: pointer; }
.case input { width: 18px; height: 18px; margin: .1rem 0 0; accent-color: var(--bleu); flex: none; }
/* Barre de recherche (accueil + page recherche) : champs alignés + bouton */
.barre-recherche {
  display: grid; gap: var(--e-4); align-items: end;
  grid-template-columns: 1fr;
  padding: var(--e-5); background: var(--blanc); border-top: 3px solid var(--bronze);
  box-shadow: var(--ombre);
}
@media (min-width: 640px) { .barre-recherche { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .barre-recherche { grid-template-columns: repeat(var(--colonnes, 4), minmax(0, 1fr)) auto; padding: var(--e-5) var(--e-6); } }
.barre-recherche .bouton { min-height: 48px; }
/* Message de confirmation (formulaire envoyé — simulation) */
.message-ok { padding: var(--e-4) var(--e-5); border-left: 3px solid var(--bronze); background: var(--ivoire-3); color: var(--bleu); }

/* 10. BADGES --------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .65rem; border-radius: var(--rayon);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; line-height: 1.2; white-space: nowrap;
  background: var(--ivoire-2); color: var(--bleu);
}
.badge-bleu { background: var(--bleu); color: var(--ivoire); }
.badge-bronze { background: var(--bronze-texte); color: var(--blanc); }
.badge-ivoire { background: rgba(243, 241, 232, .94); color: var(--bleu); }
.badge-contour { background: transparent; border: 1px solid currentColor; }
/* Marqueur « Exemple » / « À confirmer » : contenu factice ou non validé, visible de Guillaume et Quentin */
.badge-exemple { background: transparent; border: 1px dashed var(--bronze-texte); color: var(--bronze-texte); text-transform: uppercase; letter-spacing: .1em; }
.a-confirmer { outline: 1px dashed var(--bronze); outline-offset: 3px; }
/* Puces de filtre (tranches de surface, critères actifs) */
.puce {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .35rem .9rem;
  border: 1px solid var(--filet); border-radius: var(--rayon-pastille); background: transparent;
  font-size: var(--t-s); color: var(--bleu); text-decoration: none; cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.puce:hover { border-color: var(--bronze); }
.puce.est-actif, .puce[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: var(--ivoire); }
.puce svg { width: 14px; height: 14px; }

/* 11. CARTE DE BIEN (HTML produit par ORIGINE_UI.carteBien) ----------------
   Pas de boîte blanche ni d'ombre : grande photo, texte posé sur l'ivoire,
   filet bronze qui s'allonge au survol. */
.carte-bien { position: relative; display: flex; flex-direction: column; min-width: 0; }
.carte-bien-lien { position: absolute; inset: 0; z-index: 2; }  /* toute la carte est cliquable */
.carte-bien-lien:focus-visible { outline-offset: 4px; }
.carte-bien-visuel { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ivoire-2); }
.carte-bien-visuel img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.carte-bien:hover .carte-bien-visuel img { transform: scale(1.035); }
.carte-bien-sans-photo { width: 100%; height: 100%; display: grid; place-items: center; background: var(--bleu); }
.carte-bien-sans-photo img { width: 56px; height: auto; opacity: .9; }
.carte-bien-badges { position: absolute; top: .8rem; left: .8rem; right: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; z-index: 1; }
.carte-bien-badges .badge-bronze { margin-left: auto; }
.carte-bien-corps { display: flex; flex-direction: column; flex: 1; }  /* 16/10 : plus de position relative, sinon le lien ne couvrait que le texte et pas la photo */
.carte-bien-corps::before {
  content: ""; display: block; width: 40px; height: 2px; margin-bottom: 1rem; background: var(--bronze);
  transition: width .35s ease;
}
.carte-bien:hover .carte-bien-corps::before { width: 100%; }
.carte-bien-type { margin: 0 0 .15rem; font-size: var(--t-s); font-weight: 500; color: var(--bronze-texte); }
.carte-bien-ville { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; color: var(--bleu); line-height: 1.2; }  /* casse corrigée : jamais de capitales forcées sur une commune */
.carte-bien-secteur { margin: .15rem 0 0; font-size: var(--t-s); color: var(--gris-texte); }
.carte-bien-chiffres { margin-top: auto; padding-top: .9rem; display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; }
.carte-bien-surface { font-weight: 700; color: var(--anthracite); font-variant-numeric: tabular-nums; }
.carte-bien-prix { font-weight: 500; color: var(--bleu); font-variant-numeric: tabular-nums; text-align: right; }
.carte-bien-prix.est-consulter { color: var(--gris-texte); font-weight: 400; font-style: italic; }
.carte-bien-ref { margin: .35rem 0 0; font-size: var(--t-xs); color: var(--gris-texte); }

/* 12. PORTRAIT (équipe, négociateur) --------------------------------------- */
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bleu); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-vide { display: grid; place-items: center; }
.portrait-vide img { width: 34%; height: auto; object-fit: contain; opacity: .95; }
.portrait-rond { aspect-ratio: 1; border-radius: 50%; width: 88px; flex: none; }
.portrait-rond.portrait-vide { background: var(--bleu); color: var(--ivoire); font-weight: 700; letter-spacing: .06em; font-size: 1.4rem; }

/* 13. DÉFILEMENT HORIZONTAL (sliders : biens à la une, actualités, photos)
   Structure : .defilement > .defilement-piste > .defilement-element ; boutons [data-defile="prec|suiv"].
   Activé par ORIGINE_UI.activerDefilement(racine). Fonctionne aussi au doigt sans JS. */
.defilement { position: relative; }
.defilement-piste {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--defilement-largeur, 82%);
  gap: var(--e-5); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 4px;
}
.defilement-piste::-webkit-scrollbar { display: none; }
.defilement-element { scroll-snap-align: start; min-width: 0; }
@media (min-width: 640px) { .defilement-piste { grid-auto-columns: var(--defilement-largeur-m, calc((100% - var(--e-5)) / 2)); } }
@media (min-width: 1024px) { .defilement-piste { grid-auto-columns: var(--defilement-largeur-l, calc((100% - 3 * var(--e-5)) / 4)); } }
.defilement-commandes { display: flex; gap: var(--e-2); align-items: center; }

/* 14. HEXAGONES (carte des secteurs — positionnés par assets/hexagones.js)
   Hexagone « pointe en haut ». Le contour est obtenu par deux couches clippées (le clip-path
   supprime les bordures CSS) : .hex = couleur du contour, .hex::before = remplissage. */
.hex-carte { position: relative; margin-inline: auto; }
.hex {
  --hex-contour: rgba(6, 46, 55, .28);
  --hex-fond: var(--ivoire-3);
  --hex-texte: var(--bleu);
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 .9rem; border: 0; background: var(--hex-contour); color: var(--hex-texte);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  text-align: center; line-height: 1.2; cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.hex::before {
  content: ""; position: absolute; inset: 1.5px; z-index: 0; background: var(--hex-fond);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: background var(--transition);
}
.hex > * { position: relative; z-index: 1; }
.hex-nom { font-weight: 700; font-size: var(--hex-taille-nom, .92rem); letter-spacing: .02em; }
.hex-compte { margin-top: .3rem; font-size: var(--t-xs); font-weight: 500; color: var(--bronze-texte); white-space: nowrap; }
.hex:hover { --hex-contour: var(--bronze); --hex-fond: var(--blanc); }
.hex:focus-visible { outline: none; --hex-contour: var(--bronze); --hex-fond: var(--blanc); }
.hex.est-actif { --hex-contour: var(--bleu); --hex-fond: var(--bleu); --hex-texte: var(--ivoire); }
.hex.est-actif .hex-compte { color: var(--bronze-clair); }
.hex.est-vide { --hex-fond: var(--ivoire-2); --hex-texte: rgba(6, 46, 55, .5); }
.hex.est-vide .hex-compte { color: var(--gris-texte); }
/* L'hexagone MEL (porte d'entrée vers le 2e niveau) : bronze plein */
.hex.hex-mel { --hex-contour: var(--bronze); --hex-fond: var(--bronze-texte); --hex-texte: var(--blanc); }
.hex.hex-mel .hex-compte { color: var(--ivoire); }
.hex.hex-mel:hover { --hex-contour: var(--bronze-fonce); --hex-fond: var(--bronze-fonce); }
/* Repli mobile : liste de pastilles (hexagone miniature + nom + nombre) */
.hex-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-2); }
.hex-pastille {
  display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 48px; padding: .5rem .7rem;
  border: 1px solid var(--filet); background: var(--ivoire-3); border-radius: var(--rayon);
  font-size: var(--t-s); font-weight: 600; color: var(--bleu); text-align: left;
}
.hex-pastille::before {
  content: ""; flex: none; width: 14px; height: 16px; background: var(--bronze);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex-pastille.est-actif { background: var(--bleu); color: var(--ivoire); border-color: var(--bleu); }
.hex-pastille.est-vide { color: rgba(6, 46, 55, .5); }

/* 15. MOTIF (cercle ouvert + arc bronze du monogramme, très grand, faible contraste) */
.avec-motif { position: relative; isolation: isolate; overflow: hidden; }
.avec-motif::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: var(--motif-taille, min(70vw, 680px)); aspect-ratio: 383.96 / 403;
  top: var(--motif-haut, 50%); right: var(--motif-droite, -10%);
  transform: translateY(-50%);
  background: url("motif.svg") no-repeat center / contain;
}
.section-bleue.avec-motif::after, .sur-fond-bleu.avec-motif::after { background-image: url("motif-clair.svg"); }
.avec-motif-gauche::after { right: auto; left: var(--motif-gauche, -18%); }

/* 16. UTILITAIRES ---------------------------------------------------------- */
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.texte-centre { text-align: center; }
.texte-centre .chapo, .texte-centre .lecture { margin-inline: auto; }
.chiffres { font-variant-numeric: tabular-nums; }
.sans-marge { margin: 0; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--e-4); } .mt-6 { margin-top: var(--e-6); } .mt-7 { margin-top: var(--e-7); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--e-4); } .mb-6 { margin-bottom: var(--e-6); }
.rangee { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3); }
.rangee-espacee { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-3); }
.icone { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icone-l { width: 36px; height: 36px; }
@media (max-width: 639px) { .masque-mobile { display: none !important; } }
@media (min-width: 640px) { .seulement-mobile { display: none !important; } }
/* Bandeau « maquette » discret (toutes pages, injecté) */
.bandeau-maquette { background: var(--bleu); color: var(--ivoire); font-size: var(--t-xs); text-align: center; padding: .35rem var(--gouttiere); letter-spacing: .04em; }
.bandeau-maquette a { color: var(--bronze-clair); }
/* État vide (aucun résultat…) */
.etat-vide { padding: var(--e-7) var(--e-5); text-align: center; border: 1px dashed var(--filet); color: var(--bleu); }
.etat-vide p { max-width: 52ch; margin-inline: auto; }
