/* ── Polish — raffinements transversaux (sobre, précis) ─────────────────────
   Micro-interactions et détails de finition. Palette et typos inchangées.
   Toute animation respecte prefers-reduced-motion. */

:root {
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);   /* décélération douce */
  --ease-swift: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   160ms;
  --dur-base:   280ms;
  --dur-slow:   480ms;
}

/* Sélection de texte aux couleurs de la charte */
::selection { background: rgba(139, 94, 42, 0.18); color: #2D2419; }

/* Focus clavier visible et élégant, partout */
:focus-visible {
  outline: 2px solid rgba(139, 94, 42, 0.65);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Barres de défilement discrètes et chaudes */
* { scrollbar-width: thin; scrollbar-color: #C4A47A transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #C4A47A; border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Cartes : physique de survol unifiée ──────────────────────────────────── */
.card-lift {
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  will-change: transform;
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover, 0 8px 28px rgba(139, 94, 42, 0.18));
  border-color: rgba(139, 94, 42, 0.28);
}
.card-lift:active { transform: translateY(-1px) scale(0.995); }

/* ── Entrée en scène : fondu + légère montée, en cascade ─────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.stagger > * {
  animation: fadeUp var(--dur-slow) var(--ease-out) backwards;
}
.stagger > *:nth-child(1)  { animation-delay: 0ms; }
.stagger > *:nth-child(2)  { animation-delay: 35ms; }
.stagger > *:nth-child(3)  { animation-delay: 70ms; }
.stagger > *:nth-child(4)  { animation-delay: 105ms; }
.stagger > *:nth-child(5)  { animation-delay: 140ms; }
.stagger > *:nth-child(6)  { animation-delay: 175ms; }
.stagger > *:nth-child(7)  { animation-delay: 210ms; }
.stagger > *:nth-child(8)  { animation-delay: 245ms; }
.stagger > *:nth-child(9)  { animation-delay: 280ms; }
.stagger > *:nth-child(10) { animation-delay: 315ms; }
.stagger > *:nth-child(11) { animation-delay: 350ms; }
.stagger > *:nth-child(12) { animation-delay: 385ms; }
.stagger > *:nth-child(n+13) { animation-delay: 420ms; }

.fade-up { animation: fadeUp var(--dur-slow) var(--ease-out) backwards; }

/* ── Titres de page : entête éditoriale sobre ────────────────────────────── */
.page-head { margin-bottom: 1.75rem; }
.page-head h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #2D2419;
  letter-spacing: 0.01em;
  margin: 0 0 0.3rem;
}
.page-head .page-head__sub {
  color: #8B5E2A;
  font-style: italic;
  font-size: 0.92rem;
  margin: 0;
}
.page-head::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 0.8rem;
  background: linear-gradient(90deg, #8B5E2A, rgba(139,94,42,0));
  border-radius: 2px;
}

/* ── Pastille logo (annuaire, fiches) ────────────────────────────────────── */
.org-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(139, 94, 42, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(45, 36, 25, 0.06);
}
.org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}
/* Pastille de repli neutre (icône ligne) quand aucun logo n'est disponible */
.org-logo--mono {
  color: #B99A6B;
  background: linear-gradient(135deg, #FAF6EE, #F0E9DC);
}
.org-logo--mono .lucide,
.org-logo--mono svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

/* ── Lien externe discret (site web) ─────────────────────────────────────── */
.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #2A6B8A;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-swift);
}
.ext-link:hover { color: #8B5E2A; }
.ext-link svg, .ext-link .lucide { width: 12px; height: 12px; }

/* ── Champ de recherche instantanée (annuaire, listes) ───────────────────── */
.quick-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(139, 94, 42, 0.16);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  max-width: 380px;
  box-shadow: 0 1px 3px rgba(45, 36, 25, 0.05);
  transition: border-color var(--dur-fast) var(--ease-swift),
              box-shadow var(--dur-fast) var(--ease-swift);
}
.quick-filter:focus-within {
  border-color: rgba(139, 94, 42, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 94, 42, 0.10);
}
.quick-filter input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: #2D2419;
  width: 100%;
}
.quick-filter input::placeholder { color: #b3a68e; }
.quick-filter .lucide { width: 15px; height: 15px; color: #8B5E2A; flex-shrink: 0; }

/* ── Cartes annuaire ─────────────────────────────────────────────────────── */
.org-card {
  position: relative;               /* ancre du lien « étiré » */
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: #FAF6EE;
  border: 1px solid rgba(139, 94, 42, 0.10);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  height: 100%;
}
/* Lien étiré : rend toute la carte cliquable sans imbriquer de liens */
.org-card__stretch {
  color: inherit;
  text-decoration: none;
}
.org-card__stretch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
/* Le lien externe reste cliquable AU-DESSUS du lien étiré */
.org-card .ext-link { position: relative; z-index: 2; }
.org-card__body { min-width: 0; flex: 1; }
.org-card__name {
  font-weight: 650;
  color: #2D2419;
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}
.org-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.org-card__badge {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F0ECE6;
  color: #8B5E2A;
}
.org-card__country { font-size: 0.76rem; color: #9a8f7d; }
/* Plancher typographique 12 px sur téléphone */
@media (max-width: 768px) {
  .org-card__badge { font-size: 0.75rem; }
}

/* ── Mouvement réduit : tout reste instantané ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .stagger > *, .fade-up { animation: none; }
  .card-lift, .card-lift:hover, .card-lift:active { transition: none; transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ── Espace Conseil : cartes cliquables ─────────────────────────────────── */
a.db-council-card--link { display: block; color: inherit; text-decoration: none; position: relative;
  transition: transform .28s var(--ease-out, ease), box-shadow .28s var(--ease-out, ease), background .28s; }
a.db-council-card--link:hover, a.db-council-card--link:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.18); }
a.db-council-card--link:focus-visible { outline: 2px solid #C4A47A; outline-offset: 2px; }
.db-council-card__empty { color: #aaa; font-style: italic; font-size: 0.85rem; }
.db-council-card__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 0.72rem; letter-spacing: .04em;
  text-transform: uppercase; color: #C4A47A; opacity: .85; }
a.db-council-card--link:hover .db-council-card__more { opacity: 1; }
@media (prefers-reduced-motion: reduce) { a.db-council-card--link { transition: none; } }
