/* DPE Prospection — design system "Estate Excellence" (navy + or, Playfair/Inter) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:root {
  --navy: #1A2B3C;
  --navy-deep: #041627;
  --navy-soft: #38485a;
  --gold: #C5A059;
  --gold-dark: #a9863f;
  --gold-pale: #fed488;
  --bg: #f9f9ff;
  --surface: #ffffff;
  --surface-low: #f0f3ff;
  --surface-mid: #e7eeff;
  --text: #111c2c;
  --muted: #44474c;
  --outline: #c4c6cd;
  --error: #ba1a1a;
  --ok: #1a7a3c;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 12px rgba(4, 22, 39, 0.04);
  --shadow-hover: 0 6px 18px rgba(4, 22, 39, 0.08);
  --container: 1280px;
  /* --ink/--ink-soft : couleur des titres et libellés de navigation, distincte de --navy qui reste
     utilisée telle quelle comme couleur de FOND (boutons, footer, cartes "dark") — voir le thème
     sombre plus bas, qui ne bascule que --ink/--ink-soft et les surfaces, jamais --navy lui-même. */
  --ink: var(--navy);
  --ink-soft: var(--navy-soft);
}
/* ---------- Thème sombre (admin + CRM uniquement, jamais le site public) ----------
   Activé en posant data-theme="sombre" sur <html> (voir le script anti-flash dans admin_shell_debut()
   et le bouton de bascule dans la sidebar). Ne redéfinit que les surfaces/textes neutres : les couleurs
   de marque (--navy, --gold) restent identiques, elles servent déjà de fond sur des éléments déjà sombres. */
html[data-theme="sombre"] {
  --bg: #0f1620;
  --surface: #1a2432;
  --surface-low: #212c3c;
  --surface-mid: #2a3646;
  --text: #e7ecf3;
  --muted: #9aa7ba;
  --outline: #3a4a5c;
  --ink: #f2f5f9;
  --ink-soft: #c3ccd9;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.32);
}
/* Le module Abonnements (data-card/data-table/stat-card/modal...) a été construit avec une palette
   grise à part, codée en dur (#fff, #E5E7EB, #9CA3AF...) plutôt que via les variables ci-dessus : ces
   valeurs ne peuvent pas être "interceptées" en CSS, donc chaque composant concerné est redéclaré ici
   avec les variables --surface/--text/--muted/--outline (déjà sombres dans ce contexte). */
html[data-theme="sombre"] .stat-card,
html[data-theme="sombre"] .data-card,
html[data-theme="sombre"] .modal-panel,
html[data-theme="sombre"] .action-menu-list,
html[data-theme="sombre"] .nav-sous-lien.actif,
html[data-theme="sombre"] .badge-bientot,
html[data-theme="sombre"] .btn-secondary,
html[data-theme="sombre"] .action-menu-btn,
html[data-theme="sombre"] .module-toggle,
html[data-theme="sombre"] .tab-button.actif { background: var(--surface); }
html[data-theme="sombre"] .stat-card,
html[data-theme="sombre"] .data-card,
html[data-theme="sombre"] .action-menu-list,
html[data-theme="sombre"] .btn-secondary,
html[data-theme="sombre"] .action-menu-btn,
html[data-theme="sombre"] .module-toggle,
html[data-theme="sombre"] .clients-filtres select,
html[data-theme="sombre"] .clients-filtres input,
html[data-theme="sombre"] .filter-bar input,
html[data-theme="sombre"] .filter-bar select,
html[data-theme="sombre"] input,
html[data-theme="sombre"] select,
html[data-theme="sombre"] textarea { border-color: var(--outline); }
html[data-theme="sombre"] .clients-filtres select,
html[data-theme="sombre"] .clients-filtres input,
html[data-theme="sombre"] .filter-bar input,
html[data-theme="sombre"] .filter-bar select,
html[data-theme="sombre"] input,
html[data-theme="sombre"] select,
html[data-theme="sombre"] textarea { background: var(--surface); color: var(--text); }
html[data-theme="sombre"] .data-card-header { border-bottom-color: var(--surface-mid); }

/* Fonds clairs restés fixes alors que le texte posé dessus passe en clair via var(--text)/var(--muted) :
   sans ces règles, les libellés deviennent illisibles en thème sombre (signalé par Sacha le 20/07/2026).
   On assombrit le fond ET on éclaircit la teinte du texte, plutôt que de figer les couleurs des textes. */
html[data-theme="sombre"] .conteneur-admin,
html[data-theme="sombre"] .tabs,
html[data-theme="sombre"] .form-field-check,
html[data-theme="sombre"] .empty-state .empty-icon,
html[data-theme="sombre"] .action-menu-list button:hover,
html[data-theme="sombre"] .action-menu-list a:hover,
html[data-theme="sombre"] .action-menu-btn:hover,
html[data-theme="sombre"] .btn-secondary:hover { background: var(--surface-low); color: var(--text); }
/* .form-field-check (juste au-dessus) a bien été corrigé le 20/07, mais .form-field label (couleur fixe
   #374151, ligne 611) était resté hors de ce correctif — mêmes symptômes, mêmes labels illisibles en
   sombre, signalé à nouveau par Sacha le 22/07/2026 sur admin-societe.php. */
html[data-theme="sombre"] .form-field label { color: var(--text); }
html[data-theme="sombre"] .zone-sensible { background: #2b1a18; }
html[data-theme="sombre"] .chip-grey { background: var(--surface-mid); color: var(--text); }
html[data-theme="sombre"] .chip-red,
html[data-theme="sombre"] .alert-error,
html[data-theme="sombre"] .modal-error,
html[data-theme="sombre"] .btn-danger { background: #3b1a18; color: #ff9d97; }
html[data-theme="sombre"] .chip-green,
html[data-theme="sombre"] .alert-ok { background: #12321f; color: #7fd9a0; }
html[data-theme="sombre"] .chip-gold,
html[data-theme="sombre"] .icon-badge.badge-warn { background: #4a3c1d; color: var(--gold-pale); }
html[data-theme="sombre"] .chip-teal { background: #123033; color: #7fd4dc; }
html[data-theme="sombre"] .data-card-header .compteur,
html[data-theme="sombre"] .data-table th,
html[data-theme="sombre"] .data-table .cell-sub,
html[data-theme="sombre"] .action-menu-btn,
html[data-theme="sombre"] .module-toggle { color: var(--muted); }
html[data-theme="sombre"] .data-table th,
html[data-theme="sombre"] .data-table td { border-bottom-color: var(--surface-mid); }
html[data-theme="sombre"] .data-table td,
html[data-theme="sombre"] .data-table .cell-titre,
html[data-theme="sombre"] .btn-secondary,
html[data-theme="sombre"] .tab-button.actif { color: var(--text); }
html[data-theme="sombre"] .data-table tr:hover td { background: var(--surface-low); }
html[data-theme="sombre"] .zone-sensible { background: rgba(186, 26, 26, .12); border-color: rgba(186, 26, 26, .35); }
html[data-theme="sombre"] .nav-lien { color: #fff; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
h1, h2, h3, .serif { font-family: 'Playfair Display', serif; color: var(--ink); }
h1 { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 40px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 24px; font-weight: 600; line-height: 1.4; }
a { color: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 12px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--surface-mid); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo .dot { color: var(--gold); }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); }

/* Boutons — VARIANTES DE COULEUR du site public.
   La forme du bouton (.btn, .btn-sm) est définie UNE SEULE FOIS plus bas, section « Boutons (forme) ».
   Ne pas redéclarer .btn ici : jusqu'au 19/07/2026 deux définitions coexistaient avec des valeurs
   contradictoires (padding/rayon), la seconde écrasant silencieusement la première sur tout le site. */
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--navy); }
.btn-outline:hover { background: var(--surface-low); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-outline-light:hover { border-color: #fff; }
.btn-block { display: flex; width: 100%; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 70%, #24374c 100%); color: #fff; padding: 96px 0 80px; }
.hero h1 { color: #fff; max-width: 760px; }
.hero p.lead { font-size: 18px; color: #cfdaf1; max-width: 620px; margin: 24px 0 36px; }
.hero .eyebrow { color: var(--gold-pale); }
/* Mot mis en avant du hero : or clair. Sur le navy profond, --gold (#C5A059) manque de luminosité, mais
   un corail (#ff9d6b, utilisé jusqu'au 19/07/2026) introduisait une seconde couleur chaude en concurrence
   avec le bouton doré du même bloc. L'or pâle garde la lisibilité en restant dans la famille de marque. */
.hero h1 .accent-or { color: var(--gold-pale); }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Stat band */
.stats-band { background: var(--navy-deep); color: #fff; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.08); }
.stats-band .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; text-align: center; align-items: end; }
.stat .num { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; color: var(--gold-pale); line-height: 1.2; }
.stat .lbl { font-size: 13px; color: #cfdaf1; letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-sub { font-size: 16px; color: var(--muted); margin-top: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
/* Deux colonnes qui passent naturellement à une seule sous ~760px (section « Seul ou en équipe »).
   Même mécanique auto-fit que .grid-3/.grid-4 : pas de media query à maintenir. */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Ruban défilant (sous le bandeau chiffres) : rappelle en continu les sources publiques exploitées.
   Sobre par construction — navy, petites capitales espacées, une seule couleur d'accent. Le défilement
   s'arrête au survol pour rester lisible, et disparaît si le visiteur a demandé moins d'animations. */
.ruban { background: var(--navy); overflow: hidden; padding: 13px 0; position: relative; }
.ruban::before, .ruban::after { content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; }
.ruban::before { left: 0; background: linear-gradient(90deg, var(--navy), transparent); }
.ruban::after { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }
.ruban-piste { display: flex; width: max-content; animation: ruban-defile 46s linear infinite; }
.ruban:hover .ruban-piste { animation-play-state: paused; }
.ruban-item { display: inline-flex; align-items: center; gap: 10px; padding: 0 28px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.ruban-item::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
@keyframes ruban-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ruban-piste { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .ruban::before, .ruban::after { display: none; }
}
@media (max-width: 700px) { .ruban-item { font-size: 11.5px; padding: 0 18px; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: var(--shadow-hover); }
.card .step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold-pale); font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* Pricing */
.pricing-card { position: relative; display: flex; flex-direction: column; }
.pricing-card.featured { border: 2px solid var(--gold); }
.badge-pop { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.pricing-card .price { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--ink); margin: 12px 0 0; line-height: 1.15; white-space: nowrap; display: flex; align-items: baseline; gap: 5px; flex-wrap: nowrap; }
.pricing-card .price-prefix { display: block; font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.pricing-card .price-suffix { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.pricing-card .pricing-desc { color: var(--muted); }
.pricing-card ul { list-style: none; margin: 20px 0 28px; flex: 1; }
.pricing-card li { padding: 7px 0 7px 26px; font-size: 14.5px; color: var(--muted); position: relative; }
.pricing-card.agence { background: var(--navy-deep); border-color: var(--ink); }
.pricing-card.agence h3, .pricing-card.agence .price { color: #fff; }
.pricing-card.agence .price-prefix, .pricing-card.agence .price-suffix, .pricing-card.agence p, .pricing-card.agence li { color: #fff; }
.pricing-card.agence li::before { color: var(--gold-pale); }
.pricing-card.agence .badge-pop { background: var(--gold-pale); color: var(--navy-deep); }
/* Restaure le style de bouton marketing (padding/hauteur libres, texte qui peut passer sur 2 lignes) :
   la règle .btn du module Abonnements admin (plus bas dans ce fichier) impose height:40px + white-space:nowrap
   qui tronque visuellement les libellés longs comme « Démarrer avec Primo Département ». */
.pricing-card .btn { height: auto; white-space: normal; padding: 12px 20px; line-height: 1.3; }
.pricing-card li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); }

/* Blog (blog.php liste + article.php détail) */
.blog-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.blog-card-image { height: 180px; object-fit: cover; display: block; width: 100%; }
.blog-card h3 { padding: 0 24px; margin-top: 18px; }
.blog-card p { padding: 0 24px 24px; margin-top: 8px; }
.blog-card > div:first-of-type { padding: 20px 24px 0; }
.article-body { font-size: 16.5px; line-height: 1.8; color: var(--text); }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--ink); margin: 36px 0 14px; }
.article-body p { margin: 0 0 18px; }
.article-body ul { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }

/* Sélecteur de photo de couverture (admin-blog-edit.php) : banque d'images libres de droit en vignettes */
.photo-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.photo-picker-categorie { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6B7280); margin-top: 10px; }
.photo-picker-categorie:first-child { margin-top: 0; }
.photo-choix { position: relative; display: block; border-radius: 8px; overflow: hidden; cursor: pointer; line-height: 0; }
.photo-choix input { position: absolute; top: 6px; left: 6px; z-index: 1; margin: 0; }
.photo-choix img { width: 100%; height: 84px; object-fit: cover; display: block; border: 3px solid transparent; border-radius: 8px; transition: border-color .15s ease; }
.photo-choix input:checked ~ img { border-color: var(--gold); }
.photo-choix-utilisee img { opacity: .4; filter: grayscale(.6); }
.photo-choix-badge { position: absolute; bottom: 4px; left: 4px; right: 4px; background: rgba(14,31,51,.75); color: #fff; font-size: 9.5px; font-weight: 600; text-align: center; padding: 2px 4px; border-radius: 4px; line-height: 1.3; }
.seo-compteur { font-size: 11.5px; margin-top: 4px; }
.spinner-ia { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(0,0,0,.15); border-top-color: var(--navy, #1A2B3C); border-radius: 50%; animation: spin-ia .7s linear infinite; vertical-align: middle; margin-right: 2px; }
@keyframes spin-ia { to { transform: rotate(360deg); } }

/* Calendrier admin (admin-calendrier.php) */
.cal-entetes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6B7280); text-align: center; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-case { min-height: 96px; border: 1px solid var(--surface-mid); border-radius: 8px; padding: 6px; background: var(--surface); }
.cal-case.cal-vide { border-color: transparent; background: transparent; }
.cal-case.cal-aujourdhui { border-color: var(--gold); background: var(--gold-pale, #faf3e3); }
.cal-jour-num { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.cal-jour-num a { font-weight: 400; color: var(--muted, #6B7280); text-decoration: none; font-size: 13px; }
.cal-jour-num a:hover { color: var(--gold-dark); }
.cal-tache { display: block; font-size: 11px; padding: 2px 5px; border-radius: 4px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; cursor: pointer; }
.cal-tache:hover { filter: brightness(0.94); }
.cal-tache-relance { background: var(--gold-pale, #faf3e3); color: #785a1a; }
.cal-tache-article { background: #e8f0f2; color: var(--ink); }
.cal-tache-autre { background: var(--surface-mid); color: var(--muted, #6B7280); }
.cal-tache-fait { text-decoration: line-through; opacity: .55; }
.cal-plus { font-size: 11px; color: var(--muted, #6B7280); }
@media (max-width: 700px) {
  .cal-case { min-height: 64px; }
}

/* Chips */
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chip-teal { background: #e8f0f2; color: var(--ink); }
.chip-gold { background: var(--gold-pale); color: #785a1a; }
.chip-green { background: #ddf3e4; color: var(--ok); }
.chip-red { background: #ffdad6; color: #93000a; }
.chip-grey { background: var(--surface-mid); color: var(--muted); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; align-items: start; }
.faq details { background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius); padding: 18px 22px; }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 15px; }
@media (max-width: 800px) {
  .faq { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { background: var(--navy-deep); color: #cfdaf1; padding: 32px 0 20px; margin-top: 0; }
.site-footer .logo { color: #fff; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer a { color: #cfdaf1; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer .fine { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #8192a7; text-align: center; }

/* Newsletter (index.php : section dédiée #newsletter + bandeau en tête de footer) */
.newsletter-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.newsletter-form input[type=email] { width: 260px; }
/* .btn-sm impose height:32px, plus bas que le champ e-mail (~43px de haut, padding-driven) : on annule
   cette hauteur fixe pour que le bouton s'étire à la même hauteur que le champ (align-items:stretch). */
.newsletter-form .btn { height: auto; }
.footer-newsletter { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-newsletter p { color: #cfdaf1; font-size: 13.5px; margin: 0; }
.footer-newsletter .newsletter-form input[type=email] { width: 220px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.footer-newsletter .newsletter-form input[type=email]::placeholder { color: #8192a7; }

/* Forms */
.form-card { max-width: 460px; margin: 64px auto; background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); }
.form-card h1 { font-size: 30px; margin-bottom: 6px; }
.form-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: 11px 14px; font-family: 'Inter', sans-serif; font-size: 15px;
  background: #f8fafb; border: 1px solid var(--outline); border-radius: var(--radius); color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }

/* Sélecteur de communes avec autocomplétion (formulaire_secteur/script_secteur dans db.php) — même
   comportement que le sélecteur équivalent du CRM (modele-instance/crm.php), variables adaptées au design
   system du portail. */
.villes-ajout { display: flex; gap: 8px; max-width: 420px; position: relative; }
.villes-ajout input { flex: 1; }
.villes-suggestions { position: absolute; top: 100%; left: 0; width: 100%; max-width: 280px; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius); margin-top: 4px; box-shadow: var(--shadow-hover); z-index: 20; }
.ville-suggestion { padding: 9px 12px; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.ville-suggestion:hover { background: var(--surface-low); }
.ville-suggestion .cp { color: var(--muted); font-size: 12px; }
.ville-suggestion.vide { color: var(--muted); cursor: default; }
.ville-suggestion.vide:hover { background: none; }
.villes-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; min-height: 0; }
.ville-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--surface-mid); border-radius: 999px; padding: 6px 8px 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ville-badge small { font-weight: 400; color: var(--muted); }
.ville-badge button { border: none; background: var(--surface-mid); color: var(--ink); border-radius: 50%; width: 18px; height: 18px; font-size: 11px; line-height: 1; flex-shrink: 0; cursor: pointer; }
.villes-compteur { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.villes-compteur.plein { color: var(--gold-dark); font-weight: 600; }
.form-actions { margin-top: 28px; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #ffdad6; color: #93000a; }
.alert-ok { background: #ddf3e4; color: var(--ok); }

/* App layout (espace + admin) */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--surface-low); padding: 28px 20px; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .logo { margin-bottom: 40px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.sidebar nav a.active { background: var(--gold-pale); color: var(--ink); font-weight: 600; }
.sidebar nav a:hover { background: var(--surface-mid); }
.sidebar .spacer { flex: 1; }
.main { flex: 1; padding: 40px 48px; min-width: 0; }
.main h1 { font-size: 34px; margin-bottom: 4px; }
.main .sub { color: var(--muted); margin-bottom: 32px; }

/* ---------- Menu latéral admin (back-office premium, groupé + sous-menus déroulants) ---------- */
.sidebar-admin { width: 252px; padding: 22px 14px; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.sidebar-admin .logo { margin-bottom: 16px; padding: 0 6px; }
.sidebar-admin .admin-badge { font-size: 10px; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; color: var(--gold-dark); padding: 0 8px; margin-bottom: 14px; }
.sidebar-admin .nav-scroll { flex: 1; }
.nav-titre { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #9aa3b2; padding: 0 10px; margin: 18px 0 6px; }
.nav-titre:first-child { margin-top: 2px; }
.nav-lien { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); cursor: pointer; list-style: none; }
.nav-lien::-webkit-details-marker { display: none; }
.nav-lien:hover { background: var(--surface-mid); color: var(--ink); }
.nav-lien.actif { background: var(--gold-pale); color: var(--ink); font-weight: 600; }
.nav-ic { display: inline-flex; align-items: center; opacity: .82; flex-shrink: 0; }
.nav-groupe { margin-bottom: 1px; }
.nav-chevron { margin-left: auto; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); opacity: .45; transition: transform .15s ease; }
.nav-groupe[open] > summary .nav-chevron { transform: rotate(-135deg); }
.nav-sous { margin: 2px 0 6px 19px; padding-left: 12px; border-left: 1px solid var(--surface-mid); display: flex; flex-direction: column; gap: 1px; }
.nav-sous-lien { display: flex; align-items: center; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 12.5px; color: var(--muted); }
.nav-sous-lien:hover { background: var(--surface-mid); color: var(--ink); }
.nav-sous-lien.actif { color: var(--ink); font-weight: 600; background: #fff; box-shadow: var(--shadow); }
.badge-bientot { margin-left: auto; font-size: 9.5px; font-weight: 700; color: var(--gold-dark); background: #fff; border: 1px solid var(--gold-pale); border-radius: 999px; padding: 1px 6px; }
.sidebar-admin .nav-bas { border-top: 1px solid var(--surface-mid); margin-top: 10px; padding-top: 10px; }
.theme-toggle { width: 100%; border: none; background: transparent; font: inherit; text-align: left; }
.theme-toggle .nav-ic svg:last-child { display: none; }
html[data-theme="sombre"] .theme-toggle .nav-ic svg:first-child { display: none; }
html[data-theme="sombre"] .theme-toggle .nav-ic svg:last-child { display: block; }
/* Logo de la sidebar admin : texte navy illisible sur fond sombre, même bascule que l'icône soleil/lune
   ci-dessus (deux variantes rendues, le CSS choisit laquelle est visible). */
.logo .logo-sombre { display: none; }
html[data-theme="sombre"] .logo .logo-clair { display: none; }
html[data-theme="sombre"] .logo .logo-sombre { display: inline; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 36px; }
.kpi { background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.kpi.dark { background: var(--navy-deep); border-color: var(--ink); }
.kpi .lbl { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.kpi.dark .lbl { color: #8192a7; }
.kpi.dark .val { color: var(--gold-pale); }

/* Tables */
.panel { background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 32px; overflow: hidden; }
.panel-head { padding: 20px 24px; border-bottom: 1px solid var(--surface-mid); display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-size: 22px; }
.panel .inner { padding: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--surface-mid); }
td { padding: 14px 16px; border-bottom: 1px solid var(--surface-low); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface-low); padding: 3px 7px; border-radius: 4px; word-break: break-all; }
.copy-block { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--navy-deep); color: #cfdaf1; padding: 12px 14px; border-radius: var(--radius); word-break: break-all; margin: 8px 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { width: auto; flex: 1; min-width: 140px; padding: 8px 10px; font-size: 13px; }

@media (max-width: 900px) {
  h1 { font-size: 36px; } h2 { font-size: 28px; }
  .hero { padding: 64px 0 48px; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; gap: 8px; padding: 14px 16px; }
  .sidebar .logo { margin-bottom: 0; margin-right: 16px; }
  .sidebar nav { display: flex; }
  .main { padding: 24px 20px; }
  /* Le menu admin (groupes + sous-menus) reste vertical et pleine largeur sur mobile, jamais en rangée. */
  .sidebar-admin { flex-direction: column; align-items: stretch; height: auto; position: static; overflow-y: visible; padding: 16px 14px; gap: 0; }
  .sidebar-admin .logo { margin-bottom: 14px; margin-right: 0; }
}

/* Header mobile/tablette (≤900px) : pas de menu caché (hamburger écarté, jugé compliqué à
   utiliser). On garde une barre compacte à une ligne : logo + un seul bouton d'action, le
   dernier élément de .nav (toujours "Mon espace" si connecté, sinon le CTA principal — voir
   l'ordre des <a> dans chaque <header>). Les liens d'ancre (.nav-lien) et "Se connecter"
   restent accessibles en scrollant la page ou via le footer, mais pas depuis ce header. */
@media (max-width: 900px) {
  .site-header .container { height: auto; padding: 10px 16px; flex-wrap: nowrap; gap: 8px; }
  .nav { gap: 8px; }
  .nav > *:not(:last-child) { display: none; }
}

/* Optimisation mobile */
@media (max-width: 700px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .hero { padding: 36px 0 28px; }
  .hero p.lead { font-size: 16px; margin: 16px 0 24px; }
  .hero .actions .btn { width: 100%; text-align: center; }
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 28px; }
  .stats-band .container { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat .num { font-size: 26px; }
  .card, .form-card { padding: 24px 20px; }
  .form-card { margin: 32px 16px; }
  .faq details { padding: 14px 16px; }
  .faq summary { font-size: 14.5px; }
  .faq details p { font-size: 13.5px; margin-top: 8px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi .val { font-size: 26px; }
  .panel-head, .panel .inner { padding: 16px; }
  table { font-size: 13px; }
  th, td { padding: 10px 8px; }
  .btn { padding: 12px 18px; }
  .inline-form input { min-width: 100%; }
  .newsletter-box { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter-form, .footer-newsletter { flex-direction: column; align-items: stretch; }
  .newsletter-form input[type=email], .footer-newsletter .newsletter-form input[type=email] { width: 100%; }
}

/* ---------- Barre de recherche / filtres (page Clients / Agences) ---------- */
.clients-toolbar { display: flex; flex-direction: column; gap: 14px; }
.clients-recherche { width: 100%; padding: 12px 14px; border: 1px solid var(--surface-mid); border-radius: var(--radius); font-size: 14px; }
.clients-filtres { display: flex; flex-wrap: wrap; gap: 10px; }
.clients-filtres select, .clients-filtres input { padding: 9px 12px; border: 1px solid var(--surface-mid); border-radius: var(--radius); font-size: 13px; background: #fff; }
.clients-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; border-top: 1px solid var(--surface-mid); }

/* ---------- Actions sensibles (fiche client) ---------- */
.zone-sensible { border: 1px solid #f3c6c0; background: #fff6f5; border-radius: var(--radius-lg); padding: 20px; }
.zone-sensible h3 { color: #93000a; font-size: 15px; margin-bottom: 12px; }

@media (max-width: 800px) {
  .clients-filtres { flex-direction: column; }
  .clients-filtres select, .clients-filtres input { width: 100%; }

  /* Le tableau clients devient une liste de cartes empilées sur mobile : chaque <tr> = une carte,
     chaque <td> affiche son intitulé de colonne via data-label (pas de scroll horizontal). */
  table.clients-table thead { display: none; }
  table.clients-table, table.clients-table tbody, table.clients-table tr, table.clients-table td { display: block; width: 100%; }
  table.clients-table tr { border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); margin-bottom: 14px; padding: 6px 14px; box-shadow: var(--shadow); }
  table.clients-table tr:first-child { display: none; } /* ligne d'entête (th) construite en <tr> simple */
  table.clients-table td { border-bottom: 1px solid var(--surface-low); padding: 10px 0; text-align: left; }
  table.clients-table td:last-child { border-bottom: none; }
  table.clients-table td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
}

/* =====================================================================
   Module Abonnements — interface premium (admin-abonnements.php)
   ===================================================================== */
.admin-page {
  /* var(--bg), pas #F9FAFB en dur : la valeur figée ne basculait jamais en mode sombre alors que le
     texte (var(--ink)) devient quasi blanc dans ce thème — titres invisibles, texte blanc sur fond
     blanc (constaté le 20/07/2026 sur admin-marque.php, mais touchait toutes les pages .admin-page). */
  max-width: 1400px; margin: 0 auto; padding: 32px; background: var(--bg);
}
.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-page-header h1 { font-size: 28px; margin: 0 0 4px; }
.admin-page-header .sub { color: var(--muted); font-size: 14px; margin: 0; }
.admin-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Boutons (forme) — DÉFINITION UNIQUE, site public et admin ----------
   Hauteur 40 px, rayon 10 px, 14 px semi-gras (voir CHARTE-DESIGN.md §5). Les variantes de couleur du
   site public (btn-gold, btn-navy, btn-outline) sont déclarées plus haut ; celles de l'admin juste après. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none; box-sizing: border-box; white-space: nowrap; transition: background .12s ease, border-color .12s ease; }
.btn-primary { background: var(--gold, #C5A059); color: #fff; }
.btn-primary:hover { background: #B08A45; }
.btn-secondary { background: #fff; border-color: #D1D5DB; color: var(--text); }
.btn-secondary:hover { background: #F9FAFB; }
.btn-danger { background: #FEE2E2; color: #B91C1C; }
.btn-danger:hover { background: #FECACA; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-link { background: none; border: none; color: var(--gold-dark, #9A7B3E); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cartes statistiques ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.stat-card .stat-icon { width: 32px; height: 32px; border-radius: 8px; background: #F3F0E8; display: flex; align-items: center; justify-content: center; color: var(--gold-dark, #9A7B3E); }
.stat-card .stat-icon svg { width: 17px; height: 17px; }
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--text); font-family: 'Playfair Display', serif; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 4px; background: #F3F4F6; padding: 4px; border-radius: 12px; margin-bottom: 24px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab-button { flex-shrink: 0; background: none; border: none; padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 9px; white-space: nowrap; }
.tab-button:hover { color: var(--text); }
.tab-button.actif { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.panneau-onglet { display: none; }
.panneau-onglet.actif { display: block; }

/* ---------- Cartes de contenu (remplace .panel pour ce module) ---------- */
.data-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; margin-bottom: 24px; overflow: visible; }
.data-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #F3F4F6; flex-wrap: wrap; }
.data-card-header h2 { font-size: 17px; margin: 0; }
.data-card-header .compteur { font-size: 13px; color: var(--muted); }
.data-card .inner { padding: 20px 24px; }

/* ---------- Barre de filtres ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-bottom: 1px solid #F3F4F6; }
.filter-bar input, .filter-bar select { height: 40px; padding: 0 12px; border: 1px solid #D1D5DB; border-radius: 10px; font-size: 13.5px; background: #fff; box-sizing: border-box; }
.filter-bar input[type="search"] { flex: 1; min-width: 220px; }
.filter-bar select { min-width: 150px; }

/* ---------- Tableau ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #F3F4F6; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAFA; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--surface-mid); }
.data-table .cell-titre { font-weight: 600; color: var(--text); }
.data-table .cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.data-card > div.table-scroll { overflow-x: auto; }
.panel .table-scroll { overflow-x: auto; }

/* ---------- Badges de statut ---------- */
.status-badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.chip-green { background: #DCFCE7; color: #166534; }
.chip-bleu { background: #DBEAFE; color: #1E40AF; }
.chip-orange { background: #FFEDD5; color: #9A3412; }
.chip-orange-fonce { background: #FED7AA; color: #7C2D12; }
.chip-red { background: #FEE2E2; color: #991B1B; }
.chip-violet { background: #EDE9FE; color: #5B21B6; }
.chip-grey { background: #F3F4F6; color: #4B5563; }

/* ---------- Menu Actions (dropdown) ---------- */
.action-menu { position: relative; display: inline-block; text-align: left; }
.action-menu-btn { height: 34px; padding: 0 12px 0 14px; border: 1px solid #D1D5DB; border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.action-menu-btn:hover { background: #F9FAFB; }
.action-menu-btn::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid #6B7280; border-bottom: 1.5px solid #6B7280; transform: rotate(45deg); margin-top: -3px; }
.action-menu-list { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.12); padding: 6px; min-width: 200px; z-index: 30; }
.action-menu.ouvert .action-menu-list { display: block; }
.action-menu-list button, .action-menu-list a { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 9px 12px; border-radius: 8px; border: none; background: none; font-size: 13.5px; color: var(--text); cursor: pointer; text-decoration: none; }
.action-menu-list button:hover, .action-menu-list a:hover { background: #F3F4F6; }
.action-menu-list .item-danger { color: #B91C1C; }
.action-menu-list .item-danger:hover { background: #FEE2E2; }
.action-menu-list hr { border: none; border-top: 1px solid #F3F4F6; margin: 6px 0; }
.action-menu-list .item-note { display: block; padding: 8px 12px; font-size: 12px; color: var(--muted); }

/* ---------- États vides ---------- */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .empty-icon { width: 44px; height: 44px; border-radius: 12px; background: #F3F4F6; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--muted); }
.empty-state h3 { font-size: 15px; margin: 0 0 6px; color: var(--text); }
.empty-state p { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ---------- Modales premium ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 100; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal-overlay.ouvert { display: flex; }
.modal-panel { background: #fff; border-radius: 18px; width: 100%; max-width: 820px; box-shadow: 0 25px 60px rgba(16,24,40,.25); animation: modal-apparition .15s ease; margin-bottom: 48px; }
.modal-panel.modal-sm { max-width: 480px; }
@keyframes modal-apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px; border-bottom: 1px solid #F3F4F6; }
.modal-header h2 { font-size: 19px; margin: 0 0 4px; }
.modal-header .sub { font-size: 13.5px; color: var(--muted); margin: 0; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: #F3F4F6; color: #4B5563; font-size: 16px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.modal-close:hover { background: #E5E7EB; }
.modal-body { padding: 24px 28px; max-height: 60vh; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px; border-top: 1px solid #F3F4F6; }
.modal-footer .footer-droite { display: flex; gap: 10px; margin-left: auto; }
.modal-error { background: #FEE2E2; color: #991B1B; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* ---------- Formulaires (dans les modales) ---------- */
.form-section { margin-bottom: 22px; }
.form-section:last-child { margin-bottom: 0; }
.form-section h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.span-2 { grid-column: span 2; }
.form-field label { font-size: 13px; font-weight: 600; color: #374151; }
.form-field input, .form-field select, .form-field textarea {
  height: 42px; border: 1px solid #D1D5DB; border-radius: 10px; padding: 0 12px; font-size: 13.5px; background: #fff; box-sizing: border-box; font-family: inherit; color: var(--text);
}
.form-field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 70px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--gold, #C5A059); box-shadow: 0 0 0 3px rgba(197,160,89,.15); }
.form-field-check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); padding: 10px 12px; background: #F9FAFB; border-radius: 10px; }
.form-field-check input { width: 16px; height: 16px; accent-color: var(--gold, #C5A059); }

/* ---------- Grille de modules (toggles) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.module-toggle { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: 10px; font-size: 13px; color: var(--muted); cursor: pointer; background: #fff; }
.module-toggle input { width: 15px; height: 15px; accent-color: var(--gold, #C5A059); }
.module-toggle:has(input:checked) { border-color: var(--gold, #C5A059); background: #FCF9F2; color: var(--text); font-weight: 600; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .admin-page { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .form-field.span-2 { grid-column: span 1; }
  .module-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 0; }
  .modal-panel { max-width: 100%; height: 100%; border-radius: 0; margin-bottom: 0; display: flex; flex-direction: column; }
  .modal-body { flex: 1; max-height: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Landing page premium (index.php)
   ===================================================================== */

/* ---------- Hero avec preview logiciel ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-grid .lead { margin-bottom: 32px; }
.hero-proofs { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-proof { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cfdaf1; }
.hero-proof .proof-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-pale); flex-shrink: 0; }

/* Mockup dashboard flottant dans le hero */
.mockup-dashboard { background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 30px 70px rgba(4,22,39,.35); }
.mockup-dashboard .mock-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mockup-dashboard .mock-top .mock-titre { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--ink); font-size: 15px; }
.mockup-dashboard .mock-top .mock-dot-live { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ok); font-weight: 600; }
.mockup-dashboard .mock-top .mock-dot-live span { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.mock-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mock-kpi { background: var(--surface-low); border-radius: 12px; padding: 14px 16px; }
.mock-kpi .mock-kpi-val { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.mock-kpi .mock-kpi-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.mock-alert { background: var(--navy-deep); border-radius: 14px; padding: 16px; color: #fff; }
.mock-alert .mock-alert-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #ff9d6b; margin-bottom: 8px; }
.mock-alert .mock-alert-top svg { width: 16px; height: 16px; }
.mock-alert .mock-alert-adresse { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.mock-alert .mock-alert-bas { display: flex; align-items: center; justify-content: space-between; }
.mock-dpe-badge { width: 26px; height: 26px; border-radius: 6px; background: #e2452f; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.mock-score { font-size: 12px; color: #cfdaf1; }
.mock-score strong { color: var(--gold-pale); font-family: 'Playfair Display', serif; font-size: 16px; }

/* ---------- Grilles génériques ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
/* 5 formules Primo sur une seule ligne en desktop (index.php#formules) : cartes un peu plus étroites que
   .grid-4 standard, sans toucher aux autres sections qui réutilisent .grid-4 (fonctionnalités, etc.). */
.grid-formules { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- Icônes rondes (problème / solution / fonctionnalités) ---------- */
.icon-badge { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-low); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.icon-badge svg { width: 22px; height: 22px; }
.icon-badge.badge-warn { background: #fdece6; color: #c1481f; }
.icon-badge.badge-ok { background: #ddf3e4; color: var(--ok); }
.card.card-compact { padding: 26px; }
.card.card-compact h3 { font-size: 17px; }
.card.card-compact p { font-size: 14px; }

/* ---------- Méthode en 3 piliers avec flèches ---------- */
.method-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: start; }
.method-step { text-align: center; }
.method-step .method-num { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: var(--gold-pale); font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.method-step h3 { margin-bottom: 8px; }
.method-step p { color: var(--muted); font-size: 14.5px; max-width: 240px; margin: 0 auto; }
.method-arrow { display: flex; align-items: center; justify-content: center; height: 52px; color: var(--gold); flex-shrink: 0; }
.method-arrow svg { width: 28px; height: 28px; }

/* ---------- Avant / Après ---------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-col { border-radius: var(--radius-lg); padding: 32px; }
.compare-col.avant { background: var(--surface-low); border: 1px solid var(--surface-mid); }
.compare-col.avec { background: var(--navy-deep); color: #fff; }
.compare-col h3 { margin-bottom: 20px; }
.compare-col.avec h3 { color: #fff; }
.compare-col ul { list-style: none; }
.compare-col li { padding: 10px 0 10px 30px; position: relative; font-size: 14.5px; }
.compare-col.avant li { color: var(--muted); }
.compare-col.avant li::before { content: '✕'; position: absolute; left: 0; color: #b0392c; font-weight: 700; }
.compare-col.avec li { color: #e4ecf9; }
.compare-col.avec li::before { content: '✓'; position: absolute; left: 0; color: var(--gold-pale); font-weight: 700; }

/* ---------- Mini-site agent : mockup preview ---------- */
.minisite-preview { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.minisite-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-hover); overflow: hidden; border: 1px solid var(--surface-mid); }
.minisite-card .minisite-photo { height: 200px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 55%, var(--gold) 140%); position: relative; }
.minisite-card .minisite-photo .minisite-prix { position: absolute; bottom: 14px; left: 18px; background: #fff; color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; padding: 6px 14px; border-radius: 10px; }
.minisite-card .minisite-corps { padding: 20px 22px 24px; }
.minisite-card h4 { font-size: 17px; margin-bottom: 6px; }
.minisite-card .minisite-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.minisite-agent-card { background: var(--surface-low); border-radius: var(--radius-lg); padding: 22px; display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.minisite-agent-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold-pale); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.minisite-agent-nom { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.minisite-agent-role { font-size: 12.5px; color: var(--muted); }

/* ---------- Cas d'usage ---------- */
.usecase-card { text-align: center; }
.usecase-card .icon-badge { margin: 0 auto 18px; }

/* ---------- Bonus / ressources ---------- */
.bonus-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.bonus-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius); padding: 16px 18px; font-size: 14.5px; color: var(--ink); font-weight: 500; }
.bonus-item .bonus-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-low); color: var(--gold-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bonus-item .bonus-ico svg { width: 16px; height: 16px; }

/* ---------- Note abonnement ---------- */
.abo-note { text-align: center; max-width: 640px; margin: 36px auto 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Page Demander une démo (formulaire de capture de leads) ---------- */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.demo-grid label:first-of-type { margin-top: 0; }
.demo-grid > div:first-child { position: sticky; top: 90px; }
@media (max-width: 800px) {
  .demo-grid { grid-template-columns: 1fr; gap: 28px; }
  .demo-grid > div:first-child { position: static; }
}

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .method-steps { grid-template-columns: 1fr; }
  .method-arrow { transform: rotate(90deg); height: auto; margin: -4px 0; }
  .minisite-preview { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hero-proofs { flex-direction: column; gap: 12px; }
  .mock-kpis { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   Landing v2 — profondeur visuelle (mockups logiciel + ambiance)
   ===================================================================== */

/* ---------- Cadre "logiciel" (chrome navigateur) réutilisable ---------- */
.software-frame { background: #fff; border: 1px solid var(--surface-mid); border-radius: 16px; box-shadow: 0 26px 64px rgba(4,22,39,.16); overflow: hidden; }
.sf-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #f5f8fd; border-bottom: 1px solid var(--surface-mid); }
.sf-dot { width: 10px; height: 10px; border-radius: 50%; background: #d7dfea; }
.sf-dot:nth-child(1) { background: #f0aca3; }
.sf-dot:nth-child(2) { background: #f3d29a; }
.sf-dot:nth-child(3) { background: #a9dcb4; }
.sf-title { margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.sf-body { padding: 18px; }
.sf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sf-head .h { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--ink); }
.sf-live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ok); font-weight: 600; }
.sf-live span { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* Liste de biens détectés (détection DPE) */
.sf-list { display: flex; flex-direction: column; gap: 8px; }
.sf-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--surface-mid); border-radius: 10px; background: #fff; }
.sf-row .sf-addr { font-weight: 600; color: var(--ink); font-size: 13px; }
.sf-row .sf-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sf-dpe { width: 27px; height: 27px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 13px; flex-shrink: 0; }
.dpe-g { background: #e2452f; } .dpe-f { background: #ef7d2e; } .dpe-e { background: #eab308; color: #422f00; }
.sf-score { font-size: 11.5px; color: var(--muted); white-space: nowrap; text-align: right; }
.sf-score b { font-family: 'Playfair Display', serif; color: var(--gold-dark); font-size: 15px; }

/* Pipeline kanban */
.sf-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sf-col { background: var(--surface-low); border-radius: 10px; padding: 10px; }
.sf-col-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.sf-col-title .cnt { background: #fff; border-radius: 999px; padding: 1px 7px; color: var(--ink); }
.sf-cardlet { background: #fff; border: 1px solid var(--surface-mid); border-radius: 8px; padding: 9px 10px; margin-bottom: 7px; }
.sf-cardlet:last-child { margin-bottom: 0; }
.sf-cardlet .n { font-weight: 600; font-size: 12px; color: var(--ink); }
.sf-cardlet .m { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.sf-tag { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.sf-tag.chaud { background: #fde3d6; color: #b23a10; }
.sf-tag.tiede { background: #fef0cf; color: #8a6316; }
.sf-tag.mandat { background: #dbf3e2; color: #14713a; }

/* Relances */
.sf-relance { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--surface-mid); }
.sf-relance:last-child { border-bottom: none; }
.sf-date-pill { background: var(--navy); color: #fff; border-radius: 9px; padding: 6px 8px; text-align: center; min-width: 46px; flex-shrink: 0; }
.sf-date-pill .d { font-size: 16px; font-weight: 700; font-family: 'Playfair Display', serif; line-height: 1; }
.sf-date-pill .mo { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.sf-relance .who { font-weight: 600; font-size: 13px; color: var(--ink); }
.sf-relance .what { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sf-relance .canal { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-dark); flex-shrink: 0; }

/* Fiche prospect */
.sf-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sf-avatar { width: 50px; height: 50px; border-radius: 14px; background: var(--navy); color: var(--gold-pale); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.sf-profile .pn { font-weight: 700; color: var(--ink); font-size: 15px; }
.sf-profile .pm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sf-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.sf-meta { background: var(--surface-low); border-radius: 9px; padding: 10px; text-align: center; }
.sf-meta .v { font-weight: 700; color: var(--ink); font-size: 14px; }
.sf-meta .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.sf-timeline { display: flex; flex-direction: column; gap: 10px; }
.sf-tl { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.sf-tl .tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-top: 3px; flex-shrink: 0; }

/* Score d'opportunité (barres de facteurs) */
.sf-factor { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 9px; }
.sf-factor > span { flex: 0 0 104px; }
.sf-track { flex: 1; height: 7px; background: var(--surface-mid); border-radius: 999px; overflow: hidden; }
.sf-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-dark)); border-radius: 999px; }
.sf-fill-dpe { background: linear-gradient(90deg, #ef7d2e, #e2452f); }

/* Statistiques (barres) */
.sf-stats-kpis { display: flex; gap: 12px; margin-bottom: 16px; }
.sf-stat { flex: 1; background: var(--surface-low); border-radius: 10px; padding: 12px 14px; }
.sf-stat .v { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--ink); }
.sf-stat .k { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.sf-chart { display: flex; align-items: flex-end; gap: 10px; height: 110px; }
.sf-chart .bar { flex: 1; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%); border-radius: 6px 6px 0 0; position: relative; }
.sf-chart .bar.hi { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%); }

/* ---------- Panneaux d'ambiance immobilière (SVG architectural + dégradé) ---------- */
.ambiance { position: relative; border-radius: 18px; overflow: hidden; min-height: 320px; background: linear-gradient(150deg, #16283c 0%, #24384f 55%, #b9935a 165%); }
.ambiance.amb-warm { background: linear-gradient(150deg, #1d3350 0%, #3a4d64 45%, #c8a063 150%); }
.ambiance.amb-clair { background: linear-gradient(150deg, #eef2fb 0%, #dfe7f6 60%, #f6ede0 130%); }
.ambiance svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ambiance .amb-label { position: absolute; left: 22px; bottom: 20px; color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; z-index: 2; }
.ambiance.amb-clair .amb-label { color: var(--ink); }
.ambiance .amb-label .amb-pin { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-pale); }
.ambiance .amb-label .amb-pin-dpe { background: #ff9d6b; }

/* ---------- Section "Pensé pour le terrain" : rangées alternées ---------- */
.terrain-row { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; margin-bottom: 72px; }
.terrain-row:last-child { margin-bottom: 0; }
.terrain-row:nth-child(even) .terrain-text { order: 2; }
.terrain-row .terrain-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 14px; }
.terrain-row .terrain-tag svg { width: 17px; height: 17px; }
.terrain-row h3 { font-size: 25px; margin-bottom: 12px; }
.terrain-row p { color: var(--muted); font-size: 15.5px; max-width: 440px; }
/* Composition visuelle : ambiance en fond + capture logiciel qui déborde par le bas */
.terrain-visual { position: relative; padding-bottom: 46px; }
.terrain-visual .capture { position: absolute; bottom: 0; width: 74%; }
.terrain-row:nth-child(odd) .terrain-visual .capture { right: 0; }
.terrain-row:nth-child(even) .terrain-visual .capture { left: 0; }
.terrain-visual .capture .software-frame { box-shadow: 0 18px 44px rgba(4,22,39,.20); }
.terrain-visual .capture .sf-body { padding: 14px; }

/* ---------- Section preuve "Ce que StreetHome apporte" ---------- */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.proof-card { background: #fff; border: 1px solid var(--surface-mid); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow); }
.proof-card .p-num { font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 12px; }
.proof-card h3 { font-size: 16px; margin-bottom: 6px; }
.proof-card p { color: var(--muted); font-size: 14px; }

/* ---------- Showcase interface (grand cadre centré) ---------- */
.showcase { max-width: 900px; margin: 0 auto; }

/* ---------- Hero enrichi : cadre + toast flottant ---------- */
.hero-visual { position: relative; }
.hero-toast { position: absolute; left: -18px; bottom: -22px; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(4,22,39,.28); padding: 12px 16px; display: flex; align-items: center; gap: 11px; z-index: 3; max-width: 250px; }
.hero-toast .t-ico { width: 34px; height: 34px; border-radius: 10px; background: #dbf3e2; color: var(--ok); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-toast .t-ico svg { width: 18px; height: 18px; }
.hero-toast .t-titre { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.hero-toast .t-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.hero .mockup-dashboard { position: relative; z-index: 2; }

/* Étiquette DPE miniature (A→G) : signature visuelle du hero, reprend la forme des paliers en
   escalier de la vraie étiquette énergie française — pas une décoration, c'est le mécanisme même
   du produit (repérer les biens F/G) rendu visible. Le palier G est mis en avant car c'est le sujet
   de l'alerte affichée juste en dessous dans le mockup. */
.hero-dpe-echelle { position: absolute; right: -16px; top: -20px; z-index: 3; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(4,22,39,.28); padding: 12px 14px 10px; }
.hero-dpe-echelle .dpe-echelle-titre { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.dpe-echelle-rangee { display: flex; align-items: center; gap: 6px; height: 11px; margin-bottom: 2px; }
.dpe-echelle-barre { height: 100%; border-radius: 3px; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; font-size: 8px; font-weight: 700; color: #fff; }
.dpe-echelle-rangee[data-lettre=A] .dpe-echelle-barre { width: 30px; background: #0a9152; }
.dpe-echelle-rangee[data-lettre=B] .dpe-echelle-barre { width: 40px; background: #4cae4f; }
.dpe-echelle-rangee[data-lettre=C] .dpe-echelle-barre { width: 50px; background: #a3c93a; }
.dpe-echelle-rangee[data-lettre=D] .dpe-echelle-barre { width: 60px; background: #f2d02c; color: #422f00; }
.dpe-echelle-rangee[data-lettre=E] .dpe-echelle-barre { width: 70px; background: #eab308; color: #422f00; }
.dpe-echelle-rangee[data-lettre=F] .dpe-echelle-barre { width: 80px; background: #ef7d2e; }
.dpe-echelle-rangee[data-lettre=G] .dpe-echelle-barre { width: 90px; background: #e2452f; }
@media (prefers-reduced-motion: no-preference) {
  .dpe-echelle-rangee.actif .dpe-echelle-barre { animation: dpe-pulse 2.4s ease-in-out infinite; }
}
@keyframes dpe-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226,69,47,.45); } 50% { box-shadow: 0 0 0 5px rgba(226,69,47,0); } }
@media (max-width: 1000px) {
  .hero-dpe-echelle { display: none; }
}

@media (max-width: 1000px) {
  .terrain-row { grid-template-columns: 1fr; gap: 18px; margin-bottom: 32px; }
  .terrain-row:nth-child(even) .terrain-text { order: 0; }
  .terrain-visual { padding-bottom: 0; }
  .terrain-visual .capture { position: static; width: 88%; margin: -30px auto 0; }
  .terrain-row:nth-child(odd) .terrain-visual .capture,
  .terrain-row:nth-child(even) .terrain-visual .capture { right: auto; left: auto; }
}
@media (max-width: 700px) {
  .sf-kanban { grid-template-columns: 1fr; }
  .sf-meta-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-toast { left: 0; bottom: -16px; }
  .terrain-row h3 { font-size: 20px; margin-bottom: 8px; }
  .terrain-row p { font-size: 14.5px; }
  .ambiance { min-height: 180px; }
}

/* ---------- Annonces admin (espace.php + admin-annonces.php) ---------- */
.annonce-carte {
  background: var(--surface); border: 1px solid var(--surface-mid); border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 18px;
}
.annonce-carte.annonce-urgente {
  border: 1.5px solid #ba1a1a; background: linear-gradient(0deg, #fff, #fff5f5);
  box-shadow: 0 4px 18px rgba(186, 26, 26, .12);
}
.annonce-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.annonce-carte h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.annonce-carte p { font-size: 14.5px; line-height: 1.6; color: var(--text); margin: 0 0 10px; }
.annonce-carte .annonce-date { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.annonce-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.annonce-fermer {
  margin-left: auto; background: none; border: none; font-size: 22px; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 0 4px;
}
.annonce-fermer:hover { color: var(--text); }
@media (max-width: 700px) {
  .annonce-carte { padding: 16px 18px; }
  .annonce-fermer { margin-left: 0; }
  .blog-card-image { height: 150px; }
  .article-body { font-size: 15.5px; }
}

/* ---------- Resserrage mobile des blocs "carte compacte" (placé en fin de fichier exprès : les
   règles de base .card.card-compact, .icon-badge, .compare-col, .bonus-item, .proof-card,
   .minisite-preview et .usecase-card sont définies plus haut dans ce fichier, donc une correction à
   spécificité égale doit apparaître après elles dans la feuille de style pour s'appliquer, sinon elle
   est silencieusement ignorée par la cascade CSS, quelle que soit la largeur d'écran). ---------- */
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { gap: 10px; }
  .icon-badge { width: 30px; height: 30px; margin-bottom: 0; border-radius: 8px; flex-shrink: 0; }
  .icon-badge svg { width: 15px; height: 15px; }
  /* Structure horizontale (icône + titre sur une même ligne, description en dessous pleine largeur)
     plutôt qu'empilée : c'est ça qui fait vraiment gagner de la hauteur, pas juste réduire les tailles. */
  .card.card-compact { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; padding: 14px 16px; }
  .card.card-compact h3 { flex: 1; min-width: 0; font-size: 15px; margin-bottom: 0; }
  .card.card-compact p { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.45; }
  .usecase-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; text-align: left; padding: 16px 18px; }
  .usecase-card h3 { flex: 1; min-width: 0; font-size: 16px; margin-bottom: 0; }
  .usecase-card p { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.45; }
  .usecase-card .icon-badge { width: 32px; height: 32px; margin: 0; }
  .usecase-card .icon-badge svg { width: 16px; height: 16px; }
  .solution-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; padding: 14px 16px; }
  .solution-card h3 { flex: 1; min-width: 0; font-size: 15px; margin-bottom: 0; }
  .solution-card p { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.45; }
  .solution-card .icon-badge { width: 30px; height: 30px; margin: 0; }
  .solution-card .icon-badge svg { width: 15px; height: 15px; }
  .minisite-preview { gap: 18px; }
  .minisite-card .minisite-photo { height: 160px; }
  .minisite-agent-card { padding: 16px; margin-top: 12px; }
  .bonus-item { padding: 12px 14px; font-size: 13.5px; gap: 10px; }
  .bonus-item .bonus-ico { width: 26px; height: 26px; }
  .bonus-item .bonus-ico svg { width: 14px; height: 14px; }
  /* Avant/Avec restent côte à côte même sur mobile (2 colonnes étroites) plutôt qu'empilées. */
  .compare-grid { gap: 10px; }
  .compare-col { padding: 14px; }
  .compare-col h3 { margin-bottom: 8px; font-size: 15px; }
  .compare-col li { padding: 5px 0 5px 18px; font-size: 12px; line-height: 1.4; }
  .proof-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 2px; padding: 14px 16px; }
  .proof-card .p-num { font-size: 26px; margin-bottom: 0; flex-shrink: 0; }
  .proof-card h3 { flex: 1; min-width: 0; font-size: 15px; margin-bottom: 0; }
  .proof-card p { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.45; }
  /* Footer : grille 2 colonnes explicite (au lieu d'un flex-wrap "space-between" dont l'alignement
     dépend de la largeur des blocs) — logo en pleine largeur, puis Plateforme/Contact/Légal/Suivez-nous
     alignés proprement en 2x2. "Suivez-nous" (dernier bloc) est centré, titre + icônes. */
  .site-footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
  .site-footer .cols > div:last-child { text-align: center; }
  .site-footer .cols > div:last-child .footer-social { justify-content: center; }
}

/* ---------- Assistant IA (bulle flottante) — site public (index.php) et admin (admin_shell_fin()) ----------
   Variables de thème uniquement (--surface/--text/--muted/--outline...) : le thème sombre de l'admin les
   redéfinit déjà (voir tout en haut de ce fichier), donc pas de règle html[data-theme="sombre"] séparée à
   écrire ici — le site public, lui, ne bascule jamais en sombre, donc reste correct par construction. */
.assistant-ia-widget { position: fixed; right: 20px; bottom: 20px; z-index: 90; }
/* Fond or (accent unique de la charte, jamais navy) + halo pulsant dans la même teinte pour rester visible sans
   introduire une seconde couleur — voir CHARTE-DESIGN.md §1 « Règle de l'accent unique ». */
.assistant-ia-bulle {
  width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--gold); color: #fff;
  font-size: 24px; cursor: pointer; box-shadow: var(--shadow-hover); display: flex; align-items: center;
  justify-content: center; transition: transform .15s ease, background .15s ease; padding: 0;
  animation: assistant-ia-pulse 2.6s ease-in-out infinite;
}
.assistant-ia-bulle:hover { background: var(--gold-dark); transform: scale(1.06); }
@keyframes assistant-ia-pulse {
  0%, 100% { box-shadow: var(--shadow-hover), 0 0 0 0 rgba(197, 160, 89, .5); }
  50% { box-shadow: var(--shadow-hover), 0 0 0 9px rgba(197, 160, 89, 0); }
}
.assistant-ia-panneau {
  position: absolute; right: 0; bottom: 68px; width: 340px; max-width: calc(100vw - 40px); height: 460px;
  max-height: calc(100vh - 110px); background: var(--surface); border: 1px solid var(--surface-mid);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); display: flex; flex-direction: column;
  overflow: hidden;
}
.assistant-ia-tete {
  background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; font-weight: 600; font-size: 14px; flex: 0 0 auto;
}
.assistant-ia-fermer { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: .8; line-height: 1; padding: 0; }
.assistant-ia-fermer:hover { opacity: 1; }
.assistant-ia-messages { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.assistant-ia-msg { font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; }
.assistant-ia-msg.assistant { align-self: flex-start; background: var(--surface-mid); color: var(--text); border-bottom-left-radius: 3px; }
.assistant-ia-msg.utilisateur { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.assistant-ia-msg.assistant-ia-attente { opacity: .6; font-style: italic; }
.assistant-ia-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--surface-mid); flex: 0 0 auto; }
.assistant-ia-form input { flex: 1 1 auto; background: var(--surface); border: 1px solid var(--outline); border-radius: 999px; padding: 9px 14px; color: var(--text); font-size: 13.5px; }
.assistant-ia-form button { border-radius: 999px; padding: 9px 16px; font-size: 13px; flex: 0 0 auto; }
@media (max-width: 560px) {
  .assistant-ia-panneau { width: calc(100vw - 24px); right: -8px; height: calc(100vh - 130px); }
}

/* Bouton flottant « Signaler un bug » (voir admin_shell_fin() dans db.php) — côté GAUCHE, en or comme la
   bulle assistant (choix explicite de Sacha le 04/08/2026 pour la visibilité, malgré la règle « un seul
   accent doré par écran » de CHARTE-DESIGN §1 — deux bulles utilitaires en coins opposés, pas un vrai
   conflit visuel dans le même coup d'œil). */
.pm-bug-widget { position: fixed; left: 20px; bottom: 20px; z-index: 90; }
.pm-bug-bulle {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--gold); color: #fff;
  cursor: pointer; box-shadow: var(--shadow-hover); display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease; padding: 0;
}
.pm-bug-bulle:hover { background: var(--gold-dark); transform: scale(1.06); }
