/* ============================================================
   afous.ma — Feuille de style principale
   Palette : Jaune #FFD500 / Jaune foncé #FDC500
             Bleu foncé #00296b / Bleu moyen #003f88 / Bleu clair #00509d
             Bleu tint #EEF4FF / Gris chaud #6B6860
   Police  : Quicksand + Archivo Black (auto-hébergés)
   ============================================================ */

/* ── Icônes Phosphor : colorisation en bleu thème ──────────────────────────
   Les SVG Phosphor utilisent stroke/fill="currentColor".
   Chargés via <img>, currentColor = noir par défaut.
   Ce filtre CSS les convertit en #00296b (bleu foncé du thème).        */
img[src*="/phosphor-icons/"] {
  filter: brightness(0) saturate(100%)
          invert(13%) sepia(97%) saturate(850%)
          hue-rotate(198deg) brightness(97%) contrast(108%);
}

/* ─── Fonts locales ──────────────────────────────────────── */
@font-face {
  font-family: 'Quicksand';
  src: url('/assets/fonts/quicksand-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('/assets/fonts/quicksand-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('/assets/fonts/quicksand-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Black';
  src: url('/assets/fonts/archivo-black-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --c-darkest:   #00296b;  /* Bleu le plus foncé */
  --c-dark:      #003f88;     /* Bleu moyen */
  --c-blue:      #FDC500;     /* Jaune foncé — texte accent */
  --c-yellow:    #FFD500;   /* Jaune vif */
  --c-gold:      #FDC500;     /* Jaune foncé */
  --c-gold-lt:   #EEF4FF;  /* Bleu tint clair */
  --c-aqua:      #A89F96;   /* Gris chaud medium */
  --c-sidebar:   #f5f4f0;   /* Off-white chaud sidebar */
  --c-bg:        #ffffff;
  --c-bg-soft:   #EEF4FF;  /* Bleu tint doux */
  --c-border:    #E8E4D8;   /* Bordure chaude */
  --c-text:      #00296b;   /* Bleu foncé — texte principal */
  --c-muted:     #6B6860;   /* Gris chaud atténué */
  --c-success:   #FFD500;   /* Jaune */
  --c-danger:    #dc2626;
  --c-orange:    #FFD500;
  --c-orange-lt: #EEF4FF;

  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 4px rgba(255,214,0,.07);
  --shadow:      0 4px 16px rgba(255,214,0,.10);
  --shadow-lg:   0 8px 32px rgba(255,214,0,.13);
  --transition:  .2s ease;

  --container:   1200px;
  --navbar-h:    64px;

  /* ── Police globale : changer ici pour modifier tout le site ── */
  --font-main:   'Titillium Web', sans-serif;
  --font-cond:   'Titillium Web', sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
/* Empêche tout débordement horizontal de page (carrousels, ticker…) */
/* Empêche le double-tap zoom sur iOS sans bloquer les clicks */
a, button, [role="button"], input, select, textarea, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; /* supprime le flash jaune/bleu iOS au tap */
}
body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--c-text);
  background: #fff;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  letter-spacing: -.01em;
}
img { max-width: 100%; display: block; }
a  { color: var(--c-darkest); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-blue); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-main); }


/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #EEF4FF;
  height: var(--navbar-h);
  border-bottom: 1px solid rgba(0,0,0,.10);
  box-shadow: none;
}
.navbar-inner {
  height: 100%;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  direction: ltr;
  min-width: 0;
}
.navbar-logo { flex-shrink: 0; display: flex; align-items: center; gap: .55rem; text-decoration: none; min-width: 0; overflow: hidden; }
.navbar-logo img { height: 38px; width: auto; }
.navbar-logo-img { height: 34px; width: auto; display: block; flex-shrink: 0; }
.navbar-brand-name {
  font-family: var(--font-main);
  font-size: 1.45rem;
  font-weight: 800 !important;
  color: var(--c-darkest);
  letter-spacing: -.02em;
  line-height: 1;
}
.navbar-brand-name em {
  font-style: normal;
  color: #FDC500;
}

/* ── Dropdown Connexion ──────────────────────────────────── */
.nav-user-wrap { position: relative; }

.nav-user-trigger {
  display: flex; align-items: center; gap: .3rem;
  background: none; border: none;
  font-family: var(--font-main); font-weight: 600;
  cursor: pointer; width: 100%; text-align: left;
}
.nav-user-caret { transition: transform .25s; flex-shrink: 0; }
.nav-user-trigger.open .nav-user-caret { transform: rotate(180deg); }

/* ── Hero unifié (Observatoire / Outils / Palmarès / Boutique) ────────── */
/* Style identique au hero-band de l'accueil : gradient + halo + vague blanche en bas */
.afous-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(125deg, #00296b 0%, #003f88 45%, #00509d 100%);
  color: #fff;
  padding: 4rem 1.5rem 4.5rem;        /* aligné EXACTEMENT sur le hero de l'accueil (.hero-band) */
  text-align: center;
}
@media (max-width: 600px) {
  .afous-hero { padding: 2.5rem 1rem 3.5rem; }   /* idem accueil en mobile */
}
/* Halo lumineux jaune en bas, comme accueil */
.afous-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 110%, rgba(255,214,0,.18) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
/* Vague blanche en bas (clip-path ellipse) */
.afous-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 48px;
  background: #fff;
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}
.afous-hero > * { position: relative; z-index: 2; }
.afous-hero h1 {
  font-family: var(--font-cond, inherit);
  font-size: clamp(1.35rem, 3.8vw, 2rem);   /* même taille que le hero de l'accueil */
  font-weight: 900;
  margin: 0 0 .5rem; color: #fff; line-height: 1.2;
  letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.afous-hero h1 em {
  font-style: normal;
  color: #FFD500;                            /* mots mis en valeur en jaune */
}
.afous-hero p {
  color: rgba(255,255,255,.78);
  font-size: clamp(.85rem, 2vw, 1rem);
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}
.afous-hero-tag {
  display: inline-block;
  background: rgba(255,213,0,.18); color: #FFD500;
  font-size: .85rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 99px;
  margin-bottom: .8rem;
}
/* Décorations (icônes/SVG en watermark blanc) */
.afous-hero-deco {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
/* Motif zellige marocain centralisé (assets/images/zellige.svg) — appliqué à TOUS les hero. */
.afous-hero-deco::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("/assets/images/zellige.svg?v=1");
  background-repeat: repeat;
  background-size: 64px 64px;
  opacity: .07;
}

/* ── Conteneur droite (avatar + burger) ─────────────────────────────── */
.navbar-right {
  display: flex; align-items: center; gap: .5rem;
  margin-left: auto;
  order: 99;
  flex-shrink: 0;
}
/* Force l'avatar et le burger sur le même axe vertical (sinon léger décalage dû
   au position:relative du wrap qui hérite de la hauteur du dropdown caché) */
.navbar-right > .nav-user-wrap { display: flex; align-items: center; line-height: 0; }
.navbar-logo { order: 1; }
.navbar-menu { order: 50; }
/* Desktop : moins de marge */
@media (min-width: 1200px) {
  .navbar-right { margin-right: 2mm; }
}

/* ── Avatar trigger (rond sans contour) ─────────────────────────────── */
.nav-avatar-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: #FFD500; color: #00296b;
  border: none; border-radius: 50%;
  cursor: pointer; padding: 0; overflow: hidden;
  flex-shrink: 0;
  font-family: var(--font-main); font-weight: 600;
  transition: transform .12s, box-shadow .15s;
}
.nav-avatar-trigger:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.nav-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-avatar-initials { font-size: .82rem; line-height: 1; letter-spacing: -.02em; font-weight: 600; }
.nav-avatar-generic { display: flex; align-items: center; justify-content: center; }
.nav-avatar-generic svg { width: 20px; height: 20px; }

/* ── Dropdown popup — style homogène avec le drawer hamburger ──────── */
.nav-user-wrap { position: relative; }
.nav-user-wrap .nav-user-dropdown {
  max-height: none !important;
  overflow: visible;
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--c-orange-lt);                /* même fond bleu clair que le drawer */
  border: 1px solid rgba(0,41,107,.10);
  border-radius: var(--radius);
  box-shadow: -4px 0 24px rgba(255,214,0,.12), 0 8px 24px rgba(0,0,0,.10);
  z-index: 300;
  margin: 0;
  padding: .5rem 0;
}
.nav-user-wrap .nav-user-dropdown.open { display: block; }
.nav-user-wrap .nav-user-item {
  display: flex; align-items: center; gap: .6rem;
  color: #00296b; padding: .65rem 1rem;
  font-weight: 400; font-size: .9rem;
  text-decoration: none;
  transition: background .12s;
}
.nav-user-wrap .nav-user-item:hover { background: rgba(255,214,0,.25); }
.nav-user-wrap .nav-user-item svg { flex-shrink: 0; }
.nav-user-wrap .nav-user-item--danger { color: #dc2626; }
.nav-user-wrap .nav-user-item--danger svg { color: #dc2626; }
.nav-user-wrap .nav-user-item--danger:hover { background: rgba(220,38,38,.08); color: #dc2626; }

/* ── Mobile : accordéon inline ── */
.nav-user-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  margin-left: 1rem;
}
.nav-user-dropdown.open { max-height: 300px; }

.nav-user-item {
  display: block; padding: .5rem .75rem;
  font-size: .88rem; font-weight: 600; color: var(--c-darkest);
  text-decoration: none;
  transition: color .12s;
}
.nav-user-item:hover { color: var(--c-orange); }
.nav-user-item--danger { color: #dc2626; }
.nav-user-item--danger:hover { color: #b91c1c; }
.nav-user-divider { height: 1px; background: rgba(255,214,0,.2); margin: .2rem 0; }

/* ── Desktop : popup flottant ── */
@media (min-width: 1200px) {
  .nav-user-dropdown {
    max-height: none !important;
    overflow: visible;
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #E8E4D8;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 200;
    margin: 0;
    transition: none;
  }
  .nav-user-dropdown.open { display: block; }
  .nav-user-item { color: #00296b; padding: .7rem 1.1rem; }
  .nav-user-item:hover { background: #FFD500; color: #00296b; font-weight: 700; }
  .nav-user-item--danger { color: #dc2626; }
  .nav-user-item--danger:hover { background: #fef2f2; color: #dc2626; }
  .nav-user-divider { background: #E8E4D8; }
}

/* Burger */
.navbar-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  padding: 0;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}
.navbar-burger:hover { background: rgba(0,0,0,.10); }
.navbar-burger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #00296b;
  border-radius: 2px;
  transition: var(--transition);
}
.navbar-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-burger.open span:nth-child(2) { opacity: 0; }
.navbar-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay derrière le drawer */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 98;
  backdrop-filter: blur(1px);
}
.nav-overlay.open { display: block; }

/* Drawer latéral */
/* ─── Dropdown "Aide" + sous-menu (desktop + mobile accordion) ─────────── */
.nav-item-has-submenu { position: relative; display: flex; flex-direction: column; }
.nav-link--toggle {
  background: none; border: none; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; gap: .35rem;
  color: inherit; padding: inherit;
}
.nav-chevron { transition: transform .2s ease; flex-shrink: 0; }
.nav-item-has-submenu.is-open .nav-chevron { transform: rotate(180deg); }
.nav-submenu {
  list-style: none; margin: 0; padding: 0;
}
.nav-submenu li a {
  display: block; padding: .55rem .9rem;
  text-decoration: none; color: inherit;
  font-size: .92rem;
}
.nav-submenu li a:hover,
.nav-submenu li a:focus,
.nav-submenu li a.active { background: rgba(0,41,107,.06); }

/* ── Mode mobile : accordéon dans le drawer (sous-menu replié par défaut) ── */
@media (max-width: 1199px) {
  .nav-submenu {
    display: none;
    padding-left: .65rem;
    margin: .15rem 0 .35rem .65rem;
  }
  .nav-item-has-submenu.is-open .nav-submenu { display: block; }
  .nav-link--toggle { width: 100%; justify-content: space-between; }
}

/* ── Mode desktop : sous-menu en flottant ── */
@media (min-width: 1200px) {
  .nav-submenu {
    position: absolute;
    top: calc(100% + .25rem);
    left: 0; min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0,41,107,.12);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,41,107,.10);
    padding: .35rem 0;
    z-index: 100;
    display: none;
  }
  .nav-item-has-submenu.is-open .nav-submenu { display: block; }
  .nav-submenu li a { color: #00296b; font-weight: 500; }
}

.navbar-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0;
  right: 0;
  width: 72vw;
  max-width: 300px;
  background: var(--c-orange-lt);
  padding: 1.5rem 1.25rem 2.5rem;
  gap: .15rem;
  overflow-y: auto;
  overscroll-behavior: contain;       /* empêche le scroll-chaining vers la page */
  -webkit-overflow-scrolling: touch;  /* défilement inertiel iOS dans le drawer */
  z-index: 99;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(255,214,0,.12);
}
.navbar-menu.open { transform: translateX(0); }

/* Logo en tête du drawer */
.nav-drawer-logo {
  font-family: var(--font-main);
  font-weight: 800 !important;
  font-size: 1.1rem;
  color: var(--c-darkest);
  letter-spacing: -.01em;
  padding: .25rem .75rem 1.25rem;
  border-bottom: 1px solid rgba(255,214,0,.2);
  margin-bottom: .75rem;
  text-decoration: none;
  display: block;
}
.nav-drawer-logo em { font-style: normal; color: #FDC500; }

.nav-link {
  color: var(--c-darkest);
  font-size: .92rem;
  font-weight: 400;
  padding: .7rem .75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
/* Entrée Catalogue : la pastille NEW signale une nouveauté, elle n'est pas
   décorative. À retirer quand le Catalogue ne sera plus une nouveauté. */
.nav-link--new { display: inline-flex; align-items: center; gap: .4rem; }
.nav-new {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  padding: .22rem .34rem;
  border-radius: 4px;
  background: #FFD500;
  color: #00296b;
  text-transform: uppercase;
}

/* Catalogue : texte ROUGE + GRAS — aucun fond/encadré */
.nav-link--new,
.nav-link--new.active,
.nav-link--new:hover {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
  font-weight: 800;
  background: transparent !important;
  box-shadow: none !important;
}
.nav-link.active {
  color: var(--c-orange);
  background: rgba(255,214,0,.10);
}
/* Hover uniquement sur souris — évite le fond jaune persistant après tap iOS */
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--c-orange);
    background: rgba(255,214,0,.10);
  }
}
.navbar-sep { height: 1px; background: rgba(255,214,0,.2); margin: .5rem 0; }

/* Bouton S'inscrire dans la navbar */
.nav-link-register {
  background: var(--c-blue);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  padding: .45rem .9rem !important;
}
.nav-link-register:hover {
  background: var(--c-gold) !important;
  color: #fff !important;
}

/* ─── Nav — titres de section (chapitres) ─────────────────── */
.nav-section-title {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 1rem .75rem .3rem;
  margin-top: .25rem;
  pointer-events: none;
  user-select: none;
}
.nav-section-title:first-child { padding-top: .1rem; margin-top: 0; }

/* ─── Brainstorming ───────────────────────────────────────── */
.nav-brainstorm { padding: .2rem .1rem 0; }
.nav-brainstorm-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  text-align: left;
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  font-weight: 500;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
}
.nav-brainstorm-toggle:hover { color: #EEF4FF; background: rgba(255,255,255,.10); }
.nav-brainstorm-toggle .bst-arrow {
  margin-left: auto;
  font-size: .65rem;
  transition: transform .2s;
  display: inline-block;
}
.nav-brainstorm-toggle.open .bst-arrow { transform: rotate(90deg); }
.nav-brainstorm-panel {
  display: none;
  padding: .5rem .5rem .6rem;
}
.nav-brainstorm-panel.open { display: block; }
.brainstorm-lock { display: flex; flex-direction: column; gap: .4rem; }
.brainstorm-pwd-input {
  width: 100%;
  padding: .45rem .65rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: var(--font-main);
  font-size: .82rem;
  outline: none;
  transition: border-color var(--transition);
}
.brainstorm-pwd-input::placeholder { color: rgba(255,255,255,.3); }
.brainstorm-pwd-input:focus { border-color: #EEF4FF; }
.brainstorm-pwd-input.error { border-color: var(--c-danger) !important; }
.brainstorm-hint {
  color: rgba(255,255,255,.3);
  font-size: .7rem;
  padding-left: .15rem;
}
.brainstorm-unlock-btn {
  align-self: flex-start;
  padding: .35rem .8rem;
  background: rgba(255,214,0,.18);
  color: #EEF4FF;
  border: 1px solid rgba(255,214,0,.35);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
}
.brainstorm-unlock-btn:hover { background: rgba(255,214,0,.38); }
.brainstorm-content { display: flex; flex-direction: column; gap: .4rem; }
.brainstorm-textarea {
  width: 100%;
  min-height: 140px;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.85);
  font-family: var(--font-main);
  font-size: .82rem;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}
.brainstorm-textarea:focus { border-color: #EEF4FF; }
.brainstorm-textarea::placeholder { color: rgba(255,255,255,.2); }
.brainstorm-actions { display: flex; flex-direction: column; gap: .4rem; }
.brainstorm-lockbar,
.brainstorm-pwdbar,
.brainstorm-editbar { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.brainstorm-save-btn {
  padding: .32rem .75rem;
  background: rgba(255,214,0,.45);
  color: #EEF4FF;
  border: 1px solid rgba(255,214,0,.4);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
}
.brainstorm-save-btn:hover { background: rgba(255,214,0,.75); }
.brainstorm-saved-msg {
  font-size: .7rem;
  color: #EEF4FF;
  opacity: 0;
  transition: opacity .3s;
}
.brainstorm-saved-msg.show { opacity: 1; }
.brainstorm-lock-btn {
  padding: .32rem .75rem;
  background: rgba(220,38,38,.15);
  color: rgba(220,38,38,.7);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  margin-left: auto;
  transition: var(--transition);
}
.brainstorm-lock-btn:hover { background: rgba(220,38,38,.28); }

/* Sélecteur de langue */
.lang-switcher {
  display: flex;
  gap: .5rem;
  padding: .35rem .75rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,214,0,.2);
}
.lang-btn {
  color: #00296b;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  transition: color var(--transition);
}
.lang-btn:hover { color: #6B6860; }
.lang-btn.active { color: #00296b; font-weight: 700; }
.lang-sep { color: #6B6860; font-size: .75rem; }

/* Dans le drawer mobile : texte sombre */
@media (max-width: 1199px) {
  .navbar-menu .lang-btn { color: #00296b; }
  .navbar-menu .lang-btn:hover { color: #6B6860; }
  .navbar-menu .lang-btn.active { color: #00296b; font-weight: 700; }
  .navbar-menu .lang-sep { color: #6B6860; }
}

/* CTA artisan */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--c-gold-lt);
  color: var(--c-dark) !important;
  font-weight: 600;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: background var(--transition);
  margin-top: .5rem;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--c-gold); color: #fff !important; }
.btn-cta:hover .btn-cta-icon { border-color: #fff; }
.btn-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--c-dark);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

/* Mobile navbar — logo à gauche, burger à droite */
@media (max-width: 1199px) {
  .navbar-logo   { order: 0; margin-left: 0; }
  .navbar-burger { order: 1; margin-left: auto; }
}

/* Desktop navbar */
@media (min-width: 1200px) {
  .navbar-burger { display: none; }
  .nav-overlay   { display: none !important; }
  .nav-drawer-logo { display: none; }
  .navbar-menu {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    border: none;
    align-items: center;
    margin-left: auto;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    gap: .35rem;                  /* respiration entre items */
    transform: none;
    transition: none;
    width: auto;
    max-width: none;
    min-width: 0;
    flex-shrink: 1;
    top: auto; bottom: auto;
  }
  .nav-link {
    color: #00296b;
    font-size: .9rem;             /* taille plus lisible */
    font-weight: 500;
    padding: .55rem .9rem;        /* plus d'air horizontal */
    white-space: nowrap;
    background: none !important;
    border-radius: 8px;
    transition: background .15s, color .15s;
  }
  .nav-link:hover {
    color: #00296b;
    background: rgba(0,41,107,.06) !important;
    text-decoration: none;
  }
  .nav-link.active {
    color: #00296b;
    font-weight: 700;
    background: rgba(0,41,107,.08) !important;
  }
  /* Drawer logo masqué sur desktop */
  .nav-drawer-logo { display: none !important; }
  .navbar-sep { display: none; }
  .nav-section-title { display: none; }
  .nav-brainstorm { display: none; }
  .btn-cta  { margin-top: 0; }
  /* Sélecteur de langue : séparé visuellement des liens nav */
  .lang-switcher {
    margin-top: 0;
    margin-left: .5rem;
    padding: 0 .5rem;
    border-top: none;
    border-left: 1px solid rgba(0,41,107,.15);
    gap: .35rem;
  }
  .lang-sep { font-size: .75rem; color: rgba(0,41,107,.3); }
  .lang-btn { font-size: .78rem; padding: .3rem .5rem; border-radius: 6px; }
  .lang-btn.active { background: rgba(0,41,107,.08); }
}

/* Drawer mobile — active lisible + aucun jaune au tap/focus */
@media (max-width: 1199px) {
  .navbar-menu .nav-link { -webkit-tap-highlight-color: transparent; }
  /* Page active : texte bleu sur bande jaune */
  .navbar-menu .nav-link.active {
    color: #00296b !important;
    background: rgba(255,214,0,.30) !important;
    font-weight: 700;
  }
  /* Tap / focus : aucun jaune résiduel */
  .navbar-menu .nav-link:not(.active):hover,
  .navbar-menu .nav-link:not(.active):focus,
  .navbar-menu .nav-link:not(.active):active,
  .navbar-menu .nav-link:not(.active):focus-visible {
    color: #00296b !important;
    background: none !important;
    outline: none;
  }
}

/* ─── Layout ──────────────────────────────────────────────── */
.page-wrapper {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--c-bg);
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}
.page-container { flex: 1; width: 100%; }

/* ─── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .95rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--c-blue);
  color: #00296b;
}
.btn-primary:hover { background: var(--c-dark); color: #fff; }

.btn-gold {
  background: var(--c-gold-lt);
  color: var(--c-darkest);
  font-weight: 600;
}
.btn-gold:hover { background: var(--c-blue); color: #00296b; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--c-blue);
  color: var(--c-darkest);
}
.btn-outline:hover { background: var(--c-blue); color: #00296b; }

.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Bouton WhatsApp */
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  font-weight: 600;
}
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-whatsapp::before { content: ''; display: inline-block; width: 18px; height: 18px;
  background: url('/assets/images/whatsapp.svg') center/contain no-repeat; }

/* ─── Barre contextuelle sous navbar (search, register…) ─── */
.search-context {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--c-border);
}
.search-context-label {
  font-size: .82rem;
  color: var(--c-muted);
  font-weight: 500;
}
.search-context-edit {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .82rem;
  color: var(--c-darkest);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
  white-space: nowrap;
}
.search-context-edit:hover { color: #003f88; text-decoration: underline; }

/* ── Cartouche "prix indicatif" Observatoire sur /search ────────────────── */
.search-price-hint {
  display: flex; align-items: flex-start; gap: .75rem;
  max-width: var(--container, 1200px);
  width: calc(100% - 2rem);
  margin: 1rem auto 0;
  padding: .85rem 1.1rem;
  background: linear-gradient(135deg, #FFF7D6 0%, #FFE9A1 50%, #FDC500 130%);
  border: 1px solid #FDE68A;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(253,197,0,.15);
  font-size: .9rem; line-height: 1.5; color: #00296b;
}
.search-price-hint .sph-icon { flex-shrink: 0; margin-top: 1px; }
.search-price-hint .sph-icon .fline { fill: none; stroke: #00296b; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.search-price-hint .sph-icon .ffill { fill: #FDC500; stroke: none; }
.search-price-hint .sph-text { flex: 1; min-width: 0; }
.search-price-hint strong { color: #00296b; font-weight: 800; }
.search-price-hint .sph-cta {
  display: inline-block; margin-left: .25rem;
  color: #003f88; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.search-price-hint .sph-cta:hover { text-decoration: underline; }
@media (max-width: 540px) {
  .search-price-hint {
    width: calc(100% - 1rem);
    margin-top: .75rem;
    padding: .7rem .9rem;
    font-size: .82rem;
  }
}

/* ─── Filtre chips sous-catégories (search) ──────────────────── */
.search-sub-chips {
  display: flex; flex-wrap: wrap; gap: .45rem;
  padding: .85rem 1rem 0; max-width: 1100px; margin: 0 auto;
}
.search-sub-chips .ssc-chip {
  display: inline-flex; align-items: center;
  padding: .38rem .85rem;
  background: #fff;
  border: 1.5px solid #C4D8F8;
  border-radius: 99px;
  font-size: .82rem; font-weight: 600;
  color: #003f88; text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.search-sub-chips .ssc-chip:hover {
  background: #EEF4FF;
  border-color: #003f88;
}
.search-sub-chips .ssc-chip.active {
  background: #003f88;
  border-color: #003f88;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,63,136,.22);
}
@media (max-width: 480px) {
  .search-sub-chips { padding: .6rem .8rem 0; gap: .35rem; }
  .search-sub-chips .ssc-chip { font-size: .78rem; padding: .32rem .7rem; }
}

/* ─── Badge sous-catégorie (carte artisan + profil) ──────────── */
.tag-subcat {
  display: inline-block;
  flex: 0 0 auto;            /* ne pas compresser : déborde → scroll */
  padding: .03rem .5rem;
  background: #DBEAFE;
  color: #1E3A8A;
  border: 1px solid #BFDBFE;
  font-size: .64rem; font-weight: 500; line-height: 1.3;
  border-radius: 99px;
  white-space: nowrap;
}
.tag-subcat.tag-subcat-active {
  background: #003f88;
  color: #fff;
  border-color: #003f88;
}
.card-subcats {
  display: flex; flex-wrap: nowrap; gap: .25rem;
  margin-top: .35rem;
  overflow-x: auto;                 /* une seule ligne, défilable horizontalement */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;            /* Firefox : scrollbar masquée */
}
.card-subcats::-webkit-scrollbar { display: none; }   /* Chrome/Safari : masquée */

/* ─── Sections & espacement ──────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section-sm { padding: 2.5rem 1.5rem; }
.section-title {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}
.section-sub {
  color: var(--c-muted);
  font-weight: 300;
  margin-bottom: 2rem;
}
.section-divider {
  height: 3px;
  width: 40px;
  background: var(--c-gold);
  border-radius: 2px;
  margin: .5rem 0 2rem;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg,
    #000000   0%,
    #00296b  15%,
    #003f88  35%,
    #FFD500  62%,
    #FDC500  82%,
    #FFD500 100%
  );
  padding: 4rem 1.5rem 5rem;
  text-align: center;
  color: #fff;
}
.hero-title {
  font-size: clamp(2.2rem, 6.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -.03em;
}
.hero-title span { color: var(--c-gold-lt); }
.hero-sub {
  font-weight: 300;
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.search-bar {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 640px;
  margin: 0 auto;
}
.search-bar select,
.search-bar input {
  height: 42px;
  padding: 0 2.5rem 0 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
  color: var(--c-text);
  background: #fff;
  box-shadow: var(--shadow-sm);
  width: 100%;
  appearance: none;
}
.search-bar select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232D5652' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px;
}
.search-bar .btn-gold { height: 42px; font-size: .95rem; font-weight: 600; }
.search-advanced {
  max-width: 640px;
  margin: .6rem auto 0;
  text-align: right;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
}
.search-advanced a { color: var(--c-gold-lt); }

@media (min-width: 640px) {
  .search-bar { flex-direction: row; }
  .search-bar select,
  .search-bar input { flex: 1; }
  .search-bar .btn-gold { flex-shrink: 0; padding: 0 2rem; }
}

/* Espacement vertical champs de recherche sur mobile */
@media (max-width: 639px) {
  .search-bar { gap: .65rem; }
  .search-bar select,
  .search-bar input { height: 46px; font-size: 1rem; }
  .search-bar .btn-gold { height: 46px; }
}

/* ─── Bande statistiques ────────────────────────────────── */
.stats-band {
  background: var(--c-dark);
  padding: 1.75rem 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.stat-item { text-align: center; color: #fff; }
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-gold-lt);
  line-height: 1;
  letter-spacing: -.03em;
}
.stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin-top: .25rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

/* ─── Bannière métiers populaires ───────────────────────── */
.metiers-band {
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 2rem 1.5rem;
}
.metiers-band-title {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 1.25rem;
}
.metiers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}
.metier-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  border-radius: 10px;
  padding: .65rem 1.2rem;
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.metier-pill:hover { transform: translateY(-3px); box-shadow: 0 7px 18px rgba(0,0,0,.25); opacity: .92; color: #fff; }
.metier-pill-icon { font-size: 1.25rem; line-height: 1; }
.metier-pill-label { font-size: .83rem; letter-spacing: .01em; }

/* Variantes thématiques — suivent le thème actif via les variables CSS */
.pill-t1 { background: var(--c-orange); color: #00296b !important; }
.pill-t2 { background: #FFD500; color: #00296b !important; }
.pill-t3 { background: #FDC500; color: #00296b !important; }
.pill-t4 { background: #EEF4FF; color: #00296b !important; }
.pill-t5 { background: #FFD500; filter: brightness(1.2); }
.pill-t6 { background: #FDC500; filter: brightness(1.15); }

/* ─── Carrousel artisans ────────────────────────────────── */
.carrousel-outer {
  position: relative;
}
.carrousel-wrap { overflow: hidden; width: 100%; }
.carrousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: .5rem .25rem 1rem;
  scrollbar-width: none;
}
.carrousel::-webkit-scrollbar { display: none; }
/* Flèches — desktop seulement */
.carr-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .18s, border-color .18s, color .18s;
  align-items: center;
  justify-content: center;
}
.carr-arrow:hover {
  background: var(--c-darkest);
  border-color: var(--c-darkest);
  color: #fff;
}
.carr-arrow--prev { left: -16px; }
.carr-arrow--next { right: -16px; }
@media (min-width: 768px) {
  .carr-arrow { display: flex; }
}

/* ─── Cartouche artisan ─────────────────────────────────── */
/* Les cartes gardent le même layout LTR en français et en arabe.
   Le texte arabe (RTL natif) reste lisible via la gestion bidi du navigateur. */
.card-artisan { direction: ltr; unicode-bidi: isolate; }

.card-artisan {
  background: var(--c-bg);
  border: none;
  border-radius: var(--radius);
  /* padding-left réduit (1rem) pour aligner étoiles + phrase plus à gauche */
  padding: 1rem 1.5rem .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  transition: box-shadow var(--transition), transform var(--transition);
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 312px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,41,107,.06), 0 6px 16px rgba(0,41,107,.10);
}
.card-artisan:hover {
  box-shadow: 0 6px 14px rgba(0,41,107,.12), 0 18px 36px rgba(0,41,107,.16);
  transform: translateY(-3px);
}
/* Coin zellige (charte bleu/or + losanges verts) : plein au coin, s'estompe en s'éloignant */
.card-artisan::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 92px; height: 92px;
  background: url("/assets/images/zellige-coin.svg") top left / 44px 44px repeat;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
  z-index: 0;
}
.card-artisan .card-header { position: relative; z-index: 1; }
.card-artisan .card-info { margin-left: .4rem; }
/* Pastille de disponibilité — coin bas-droite (vert = dispo, rouge = non) */
/* Badges bas-droit regroupés : point de dispo (si dispo) + appareil photo (si photos) — l'appareil photo au coin */
.card-badges {
  position: absolute;
  right: .5rem; bottom: .5rem;
  display: flex; align-items: center; gap: .35rem;
  z-index: 3;
}
.card-dispo-dot {
  flex-shrink: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px #fff, 0 1px 2px rgba(0,0,0,.25);
}
.card-dispo-dot--on  { background: #22c55e; }
.card-dispo-dot--off { background: #ef4444; }
/* Appareil photo (a des photos) — au coin bas-droit */
.card-photo-badge {
  flex-shrink: 0;
  width: 22px; height: 18px;
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,.95));
}
/* Cœur + nombre de likes dans la cartouche (à côté des avis) */
.card-likes { display:inline-flex; align-items:center; gap:.15rem; margin-left:.4rem; font-size:.78rem; font-weight:700; color:#9aa3b2; vertical-align:middle; }
.card-likes svg { fill:#c3cbd8; }
.card-likes.has { color:#e0245e; }
.card-likes.has svg { fill:#e0245e; }
.card-artisan-full { width: 100%; flex-shrink: 1; }

/* Mini-icône métier — coin bas-droit (≈ 0.5 cm × 0.5 cm, bleu foncé) */
.card-metier-icon-wrap {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  width: 30px;
  height: 30px;
  line-height: 0;
}
.card-metier-icon {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
  opacity: .8;
  filter: brightness(0) saturate(100%) invert(13%) sepia(89%) saturate(2400%) hue-rotate(218deg) brightness(55%) contrast(115%);
}
/* Quand l'icône est dans le wrapper (cartes JS) : positionnement statique */
.card-metier-icon-wrap .card-metier-icon {
  position: static;
  right: auto;
  bottom: auto;
}
/* Badge "+N" autres métiers — jaune, texte bleu, sans gras, coin haut-droite */
.card-metier-more {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFD500;
  color: #00296b;
  border-radius: 99px;
  font-size: .62rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
/* La carte artisan reste en disposition LTR identique en arabe (pas de flip RTL) →
   évite que les étoiles chevauchent l'icône métier. */

/* Profils mis en avant : pas de cadre spécial (signalé par l'icône ✦ en bas de carte) */
/* Profils recommandés (mis en avant) : carte STRICTEMENT identique aux autres
   (même ombre 3D, pas de halo jaune) — seul le badge vert « Recommandé par Afous » diffère. */

/* Urgence → petit onglet vert arrondi, collé dans le coin haut-droit */
/* Onglet "Urgences" — élément HTML (rouge + icône sirène SVG), partagé carte + fiche */
.card-urgence-tab {
  position: absolute;
  top: 0; right: 0;
  display: inline-flex; align-items: center; gap: 3px;
  background: #dc2626; color: #fff;
  font-size: .56rem; font-weight: 700; letter-spacing: .3px;
  padding: 3px 8px 4px;
  border-radius: 0 var(--radius) 0 8px;
  line-height: 1;
  z-index: 4;
  pointer-events: none;
}
.card-urgence-tab svg { flex-shrink: 0; }


/* Avatar wrapper (plus de bordure niveau) */
.card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 55px;
  height: 55px;
}
/* Badge "Vérifié" sur les cartes artisan — vert WhatsApp */
.verif-pill--row {
  display: flex; align-items: center; gap: .35rem;
  color: #25D366;                    /* vert WhatsApp */
  font-size: .75rem; font-weight: 700;
  margin-top: .35rem;
  line-height: 1.1;
}
.verif-pill--row .verif-icon { flex-shrink: 0; }
/* Icône PNG Flaticon tintée vert flashy */
.verif-pill--row .verif-icon-img {
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(40%) sepia(67%) saturate(560%) hue-rotate(94deg) brightness(94%) contrast(91%);
}
.card-avatar {
  width: 55px; height: 55px;
  border-radius: 50%;
  background: var(--c-bg-soft);
  box-shadow: 0 0 0 3px #fff;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  position: relative;
  z-index: 1;
}

/* Anneau métallique via ::before — conic-gradient simule le reflet métal */
.card-avatar-wrap--bronze::before,
.card-avatar-wrap--argent::before,
.card-avatar-wrap--or::before,
.card-avatar-wrap--expert::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px;
  width: 60px; height: 60px;
  border-radius: 50%;
  z-index: 0;
}
.card-avatar-wrap--bronze::before {
  background: conic-gradient(from 315deg,
    #3d1a06 0%, #a0581a 14%, #cd7f32 28%, #e8a060 40%,
    #ffd5a0 50%, #e8a060 60%, #cd7f32 72%, #a0581a 86%, #3d1a06 100%);
}
.card-avatar-wrap--argent::before {
  background: conic-gradient(from 315deg,
    #3a483a 0%, #7a9a7a 16%, #aec4ae 32%, #d8ecd8 44%,
    #f0faf0 50%, #d8ecd8 56%, #aec4ae 68%, #7a9a7a 84%, #3a483a 100%);
}
.card-avatar-wrap--or::before {
  background: conic-gradient(from 315deg,
    #5a3800 0%, #b87c00 14%, #e8a800 28%, #ffd700 40%,
    #fff380 50%, #ffd700 60%, #e8a800 72%, #b87c00 86%, #5a3800 100%);
}
.card-avatar-wrap--expert::before {
  background: conic-gradient(from 315deg,
    #6a5000 0%, #c8a000 12%, #ffd700 24%, #fff8a0 36%,
    #ffffff 50%, #fff8a0 64%, #ffd700 76%, #c8a000 88%, #6a5000 100%);
}

/* Tooltip niveau au survol du contour */
.card-avatar-wrap--bronze::after,
.card-avatar-wrap--argent::after,
.card-avatar-wrap--or::after,
.card-avatar-wrap--expert::after {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  font-weight: 300;
  font-family: var(--font-main);
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 10;
}
.card-avatar-wrap:hover::after { opacity: 1; }
.card-avatar-wrap--bronze::after { content: 'Bronze'; background: #cd7f32; color: #fff; }
.card-avatar-wrap--argent::after { content: 'Argent'; background: #8aaa8a; color: #fff; }
.card-avatar-wrap--or::after     { content: 'Or';     background: #e8a800; color: #2a1800; }
.card-avatar-wrap--expert::after { content: 'Expert'; background: #ffd700; color: #1a1200; }

.card-avatar-initiales {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #111827;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}
.card-nom {
  font-weight: 600;
  font-size: .97rem;
  color: #111827;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-metier {
  font-size: .72rem;
  color: #00296b;
  font-weight: 600;
  line-height: 1.35;
  margin-top: .15rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Ville → badge ambré (cohérent avec les tag-ville du dashboard) */
.card-ville {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: #B8860B;                /* ville en jaune or, sans pastille */
  margin-top: .15rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}
.card-header { display: flex; align-items: flex-start; gap: .75rem; }
.card-info   { flex: 1; min-width: 0; }
.card-membre { font-size: .68rem; color: #9ca3af; font-style: italic; margin-top: 0; line-height: 1.2; }
/* Icône sexe = silhouette personne (masque PNG), noire — cf fiche artisan */
.sexe-icon { display: inline-block; width: 16px; height: 16px; margin-left: .3rem; vertical-align: -3px;
  background-color: #111827; -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat; }
.sexe-icon--h { -webkit-mask-image: url(/assets/images/sexe-homme.png); mask-image: url(/assets/images/sexe-homme.png); }
.sexe-icon--f { -webkit-mask-image: url(/assets/images/sexe-femme.png); mask-image: url(/assets/images/sexe-femme.png); }
[dir="rtl"] .sexe-icon { margin-left: 0; margin-right: .3rem; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .73rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-gold      { background: var(--c-gold-lt); color: var(--c-dark); }
.badge-blue      { background: var(--c-blue);    color: #fff; }
.badge-dark      { background: var(--c-dark);    color: #fff; }
.badge-success   { background: #EEF4FF; color: var(--c-success); }
.badge-urgence   { background: #fef2f2; color: var(--c-danger); border: 1px solid #fecaca; }
.badge-pin       { background: #EEF4FF; color: #FFD500; border: 1px solid #6B6860; font-size: .68rem; }
/* ─── Lampe disponibilité — coin haut-gauche de la carte ─── */
.card-dispo-lamp {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .01em;
  z-index: 2;
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}
.lamp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-dispo-lamp--on  { color: #16a34a; }
.card-dispo-lamp--on  .lamp-dot {
  background: #22c55e;
  box-shadow: 0 0 4px 1px rgba(34,197,94,.8);
}
.card-dispo-lamp--off { color: #dc2626; }
.card-dispo-lamp--off .lamp-dot {
  background: #dc2626;
  box-shadow: 0 0 4px 1px rgba(220,38,38,.75);
}
.badge-bronze    { background: #f5f4f0; color: #00296b; }
.badge-argent    { background: #f5f4f0; color: #FFD500; }
.badge-or        { background: #EEF4FF; color: var(--c-dark); }
.badge-expert    { background: var(--c-gold-lt); color: var(--c-dark); }

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

/* ─── Ticker nouveaux artisans ───────────────────────────── */
.section-ticker {
  background: var(--c-darkest);
  padding: .65rem 0;
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}
.ticker-label {
  color: var(--c-gold-lt);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-right: 1px solid rgba(255,255,255,.2);
  padding-right: 1rem;
}
.ticker-track-wrap { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 100s linear infinite;
}
.ticker-item {
  display: inline;
  color: rgba(255,255,255,.82);
  font-size: .8rem;
  white-space: nowrap;
  margin-right: 2.5rem;
  text-decoration: none;
  cursor: pointer;
}
.ticker-item:hover { color: var(--c-gold-lt); }
.ticker-item em {
  font-style: normal;
  color: var(--c-gold-lt);
  font-size: .74rem;
  margin-left: .35rem;
}
.ticker-sep {
  display: inline;
  color: rgba(255,255,255,.25);
  font-size: .9rem;
  margin-right: 2.5rem;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Étoiles ────────────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #E8E4D8;
  font-size: .88rem;
}
.stars .filled { color: var(--c-gold); }
.stars-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .76rem;
  color: var(--c-muted);
}

/* Footer card : étoiles à hauteur FIXE depuis le bas + phrase encore plus bas
   → garantit que les étoiles sont à la même position, phrase présente ou pas */
.card-artisan .card-footer { display: contents; }       /* le wrapper n'impacte pas le layout */
.card-artisan .stars-row {
  position: absolute;
  left: 1rem;
  right: 46px;                                          /* laisse la place à la mini-icône métier en bas-droite */
  bottom: .5rem;                                        /* étoiles = ligne la plus en bas */
  flex-direction: column;                              /* la pill "Recommandé" passe SOUS les étoiles */
  align-items: flex-start;
  gap: .3rem;
}
.card-artisan .stars-line { display: flex; align-items: center; gap: .4rem; }
/* carte recommandée : on remonte les lignes vérifiées pour loger la pill sous les étoiles */
.card-artisan.card-pin .card-trust { bottom: 3.4rem; }
/* Lignes vérifiées (bas-gauche, au-dessus des étoiles) — texte vert, puce = sceau vérifié */
.card-artisan .card-trust {
  position: absolute;
  left: 1rem;
  right: 46px;                 /* laisse la place à la mini-icône métier en bas-droite */
  bottom: 2.2rem;             /* marge au-dessus des étoiles */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
}
.card-artisan .card-trust .trust-line {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .64rem;
  line-height: 1.2;
  font-weight: 700;
  color: #16a34a;             /* texte vérifié entièrement en vert */
}
.card-artisan .card-trust .trust-line--no { color: #dc2626; }   /* non vérifié → rouge */
.card-artisan .card-trust .trust-check { flex-shrink: 0; }
/* Pill « Recommandé par Afous » — dorée, texte noir, avec reflet brillant (shine) */
.trust-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  background: linear-gradient(135deg, #FFD500 0%, #FFC300 55%, #FFE066 100%);
  color: #1a1a1a;
  font-size: .56rem; font-weight: 800;
  padding: .14rem .55rem; border-radius: 99px;
  line-height: 1.3; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(214,158,0,.45);
}
.trust-pill::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.85) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: pillShine 3.5s ease-in-out infinite;
}
@keyframes pillShine {
  0%   { left: -75%; }
  22%  { left: 135%; }
  100% { left: 135%; }
}
@media (prefers-reduced-motion: reduce) {
  .trust-pill::after { animation: none; }
}
/* Badge ⭐ Premium — chip charte (bleu nuit + étoile or). Réutilisable partout. */
.premium-chip {
  display: inline-flex; align-items: center; gap: .22rem;
  background: #00296b; color: #fff;
  border: 1px solid #FFC300;
  font-size: .58rem; font-weight: 800;
  padding: .12rem .5rem; border-radius: 99px;
  line-height: 1.3; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,41,107,.3);
  margin-inline-end: .3rem;
}
.premium-chip svg { flex-shrink: 0; }
.card-artisan .verif-pill--row {
  position: absolute;
  left: 1rem;
  right: 55px;
  bottom: .5rem;
  margin-top: 0 !important;
}

/* ─── Section locale ─────────────────────────────────────── */
.section-local { background: var(--c-bg-soft); }

/* ─── Fiche artisan (page détail) ───────────────────────── */
.artisan-hero {
  background: linear-gradient(135deg,
    #000000   0%,
    #00296b  15%,
    #003f88  35%,
    #FFD500  62%,
    #FDC500  82%,
    #FFD500 100%
  );
  color: #fff;
  padding: 2.5rem 1.5rem;
}
.artisan-hero-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  max-width: var(--container);
  margin: 0 auto;
}
.artisan-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-gold-lt);
  flex-shrink: 0;
}
.artisan-nom {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.artisan-metiers { color: var(--c-gold-lt); font-weight: 500; margin-top: .2rem; }

.artisan-body { padding: 2rem 1.5rem; }
.artisan-section {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.artisan-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.artisan-section-title {
  font-weight: 600;
  color: var(--c-dark);
  border-bottom: 2px solid var(--c-gold);
  padding-bottom: .3rem;
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
}

/* Contact artisan */
.contact-btns {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (min-width: 480px) {
  .contact-btns { flex-direction: row; flex-wrap: wrap; }
}

/* Galerie avant/après */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gallery-before-after .label {
  font-size: .7rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: .2rem .4rem;
  position: absolute;
  bottom: 0; left: 0;
  border-radius: 0 var(--radius-sm) 0 0;
}
.gallery-before-after > div { position: relative; aspect-ratio: 1; overflow: hidden; }
.gallery-before-after img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Formulaires ────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 500;
  font-size: .88rem;
  margin-bottom: .4rem;
  color: var(--c-dark);
}
.form-label .required { color: var(--c-danger); margin-left: .2rem; }
.form-control {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(255,214,0,.25);
}
textarea.form-control { height: auto; padding: .75rem 1rem; resize: vertical; }
select.form-control   { appearance: none; cursor: pointer; }
.form-hint { font-size: .8rem; color: var(--c-muted); margin-top: .3rem; }
.form-error { font-size: .82rem; color: var(--c-danger); margin-top: .3rem; }

/* Checkboxes / radio */
.check-group { display: flex; flex-direction: column; gap: .5rem; }
.check-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .92rem;
}
.check-label input { accent-color: var(--c-blue); width: 16px; height: 16px; }

/* Barre de progression inscription */
.progress-bar {
  height: 5px;
  background: var(--c-border);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--c-blue);
  border-radius: 3px;
  transition: width .4s ease;
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.progress-step {
  font-size: .8rem;
  color: var(--c-muted);
  font-weight: 500;
}
.progress-step.active { color: var(--c-blue); font-weight: 600; }
.progress-step.done   { color: var(--c-success); }

/* ─── Alertes ────────────────────────────────────────────── */
.alert {
  padding: .9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid transparent;
}
.alert-success { background: #EEF4FF; border-color: var(--c-success); color: #FFD500; }
.alert-error   { background: #fef2f2; border-color: var(--c-danger);  color: #dc2626; }
.alert-info    { background: #EEF4FF; border-color: var(--c-blue);    color: var(--c-blue); }
.alert-warning { background: #f5f4f0; border-color: var(--c-gold);    color: var(--c-dark); }

/* ─── Page mode Phase 1 ─────────────────────────────────── */
.phase1-wrapper {
  min-height: calc(100dvh - var(--navbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  background: linear-gradient(160deg,
    #000000   0%,
    #00296b  15%,
    #003f88  35%,
    #FFD500  62%,
    #FDC500  82%,
    #FFD500 100%
  );
  color: #fff;
}
.phase1-logo { width: 120px; margin: 0 auto 2rem; }
.phase1-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -.03em;
}
.phase1-title span { color: var(--c-gold-lt); }
.phase1-sub {
  font-weight: 300;
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.phase1-cta { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
@media (min-width: 480px) {
  .phase1-cta { flex-direction: row; justify-content: center; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer { margin-top: auto; }

/* Bande 1 : bleu clair — identité */
.footer-brand-band {
  background: #d4e8f8;
  padding: 1.75rem 1.5rem;
}
.footer-brand-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-logo-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  margin-bottom: .4rem;
}
.footer-logo-link img    { height: 34px; width: auto; display: block; flex-shrink: 0; }
.footer-logo-link strong { font-size: 1.2rem; color: var(--c-darkest); letter-spacing: -.02em; line-height: 1; }
.footer-motto { font-size: .87rem; color: #1c3d6a; line-height: 1.65; margin: 0; }

/* Bande 2 : bleu foncé — navigation + bas de page */
.footer-nav-band { background: var(--c-darkest); }
.footer-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.25rem;
}
.footer-nav-cols--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 900px) { .footer-nav-cols--4 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (max-width: 480px) { .footer-nav-cols--4 { grid-template-columns: 1fr; } }

/* Maillage SEO interne (top métiers × top villes) — boost de visibilité */
.footer-seo-mesh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
  padding: 1.25rem 0;
  margin-bottom: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 600px) { .footer-seo-mesh { grid-template-columns: 1fr; } }
.footer-seo-col h5 {
  margin: 0 0 .55rem;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.55);
}
.footer-seo-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .35rem .55rem;
}
.footer-seo-col li a {
  display: inline-block; padding: .2rem .55rem;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.72);
  border-radius: 99px;
  font-size: .8rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.footer-seo-col li a:hover { background: var(--c-gold); color: #00296b; }

.footer-nav-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-links h4 {
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: .75rem;
  font-weight: 600;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .87rem;
  margin-bottom: .4rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-admin-link { opacity: .35; font-size: .78rem !important; }
.footer-admin-link:hover { opacity: .75; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1rem;
  font-size: .78rem;
  text-align: center;
  color: rgba(255,255,255,.45);
}
.footer-bottom p { margin: 0 0 .2rem; }
.footer-cndp {
  margin-top: .45rem;
  font-size: .7rem;
  color: rgba(255,255,255,.32);
  line-height: 1.5;
}
.footer-cndp a { color: rgba(255,255,255,.45); text-decoration: underline; }

/* ─── Pages légales ──────────────────────────────────────── */
.legal-wrap { max-width: 820px; margin: 0 auto; }
.legal-title { font-family: var(--font-cond); font-size: clamp(1.4rem,4vw,2rem); font-weight: 800; color: var(--c-darkest); margin-bottom: .4rem; }
.legal-update { color: var(--c-muted); font-size: .88rem; margin-bottom: 2.5rem; }
.legal-section { margin-bottom: 2rem; }
.legal-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--c-darkest); border-bottom: 2px solid var(--c-gold); padding-bottom: .3rem; margin-bottom: .75rem; }
.legal-section h3 { font-size: .95rem; font-weight: 700; color: var(--c-dark); margin: 1rem 0 .4rem; }
.legal-section p, .legal-section li { font-size: .92rem; line-height: 1.75; color: var(--c-text); }
.legal-section ul { padding-left: 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.legal-section a { color: var(--c-blue); }
.legal-notice { background: #EEF4FF; border-left: 3px solid var(--c-blue); border-radius: 0 6px 6px 0; padding: .75rem 1rem; margin-top: .75rem; font-size: .88rem; line-height: 1.6; color: var(--c-dark); }
.legal-notice a { color: var(--c-blue); }

/* ─── Utilitaires ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.text-gold   { color: var(--c-gold); }
.text-dark   { color: var(--c-dark); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.wrap { flex-wrap: wrap; }

/* Spinner loader */
.search-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 0;
}
.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #EEF4FF;
  border-top-color:    #00296b;
  border-right-color:  #FDC500;
  border-bottom-color: #003f88;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RTL ─────────────────────────────────────────────────── */
.section-title   { direction: ltr; text-align: left; }
.section-divider { margin-left: 0; margin-right: auto; }

.rtl .alert { border-left: none; border-right: 4px solid transparent; }
.rtl .alert-success { border-color: var(--c-success); }
.rtl .alert-error   { border-color: var(--c-danger); }
.rtl .alert-info    { border-color: var(--c-blue); }

/* ─── Search pagination ───────────────────────────────────── */
.search-pagination { display:flex; gap:.4rem; justify-content:center; flex-wrap:wrap; margin-top:1.5rem; padding-top:1rem; border-top:1px solid var(--c-border); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* ─── Page Recherche ──────────────────────────────────────── */
.filters-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .filters-main-grid { grid-template-columns: 1fr; gap: .35rem; }
}

.paves-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.pave {
  flex: 1 1 140px;
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .82rem;
}
@media (max-width: 640px) { .pave { flex: 1 1 100%; } }
.pave-titre {
  font-weight: 700;
  font-size: .8rem;
  color: var(--c-dark);
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: .1rem;
}
.pave-scroll {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 92px;
  overflow-y: scroll;            /* scrollbar toujours active */
  padding: .3rem .4rem;
  background: rgba(0,41,107,.04);/* léger fond = zone défilable visible, SANS bordure/cadre */
  border-radius: 6px;
  scrollbar-width: auto;
  scrollbar-color: #00296b #e7e3d6;
}
.pave-scroll::-webkit-scrollbar { width: 9px; }
.pave-scroll::-webkit-scrollbar-track { background: #e7e3d6; border-radius: 99px; }
.pave-scroll::-webkit-scrollbar-thumb { background: #00296b; border-radius: 99px; border: 2px solid #e7e3d6; }
.pave-check {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--c-text);
  line-height: 1.3;
}
.sel-wrap { position: relative; }
.sel-wrap .form-control { padding-right: 2rem; height: 38px; font-size: .9rem; }
.sel-arrow {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: .8rem;
  color: var(--c-muted);
}
.sort-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.4rem;
  font-size: .85rem;
}
.sort-bar-label { color: var(--c-muted); font-weight: 600; }
.sf-select-wrap--inline { position: relative; display: inline-flex; align-items: center; }
.sf-select--inline {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid var(--c-border);
  border-radius: 0;
  padding: .15rem 1.4rem .15rem .1rem;
  font-size: .85rem;
  font-weight: 700;
  color: #00509d;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}
.sf-select--inline:focus { border-bottom-color: #00509d; }
.sf-arrow {
  position: absolute;
  right: .1rem;
  pointer-events: none;
  font-size: .75rem;
  color: var(--c-muted);
}
.check-label-lg { font-size: .9rem; gap: .5rem; }
.star-picker { display: flex; align-items: center; gap: .1rem; }
.star-pick {
  font-size: 1.6rem;
  color: #E8E4D8;
  cursor: pointer;
  transition: color .12s, transform .1s;
  user-select: none;
  line-height: 1;
}
.star-pick.on { color: var(--c-gold); }
.star-pick:hover { }
.star-reset {
  margin-left: .35rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .78rem;
  color: #6B6860;
  padding: .1rem .3rem;
  transition: color .15s;
}
.star-reset:hover { color: var(--c-danger); }
.filters-advanced {
  margin-top: .75rem;
  background: var(--c-bg-soft);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .85rem;
}
.filters-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-blue);
  background: none;
  border: none;
  padding: .35rem 0;
  font-family: inherit;
}
.filters-advanced-toggle:hover { color: var(--c-dark); }

/* ─── Résultats de recherche (grille JS) ─────────────────── */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: .5rem;
}
.cards-grid .card-artisan {
  width: 100%;
  flex-shrink: 1;
}
@media (min-width: 640px) {
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
  }
}
/* Page recherche : même gabarit que les landing SEO (.lp-wrap) → cartes de taille identique */
.section-sm.search-wrap { max-width: 1100px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

