/* ===========================================================================
   Feuille de style commune à toutes les fiches.
   Les couleurs de chaque carte viennent de son thème (themes/<thème>/theme.json),
   transformé en variables CSS dans /assets/themes/<thème>/theme.css.
   =========================================================================== */

@font-face {
  font-family: 'Cormorant';
  src: url('/assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --serif: 'Cormorant', 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  /* valeurs par défaut (remplacées par le thème) */
  --fond-page: #f2f1ee; --fond: #fff; --texte: #151515; --texte-doux: #5f5f5f;
  --accent: #8a6a2c; --bouton: #151515; --bouton-texte: #fff;
  --ligne: #e8e6e1; --bandeau: #111; --bandeau-texte: #eee; --logo: currentColor;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--fond-page); color: var(--texte);
  font-family: var(--sans); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* --- La carte ------------------------------------------------------------- */
.card {
  position: relative; background: var(--fond);
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
}
@media (min-width: 560px) {
  body { padding: 56px 16px; }
  .card {
    max-width: 440px; margin: 0 auto; min-height: 0;
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 24px 60px -18px rgba(0,0,0,.28);
  }
  .l-sombre .card { box-shadow: 0 0 0 1px var(--ligne), 0 30px 80px -20px rgba(0,0,0,.7); }
}

.body { padding: 0 28px 28px; display: flex; flex-direction: column; flex: 1; }

/* --- En-tête -------------------------------------------------------------- */
.hero { text-align: center; padding: 0 28px; }
.l-sombre .hero { padding-top: 60px; }
.logo { color: var(--logo); display: flex; justify-content: center; }
.logo svg { width: auto; }
.t-ancora .logo svg { height: 118px; }
.t-lrdq .logo svg { height: 82px; }

.band {
  background: var(--bandeau); color: var(--bandeau-texte);
  display: flex; align-items: center; justify-content: center;
  position: relative; min-height: 148px; padding: 28px;
}
.band .logo svg { height: 56px; }
.t-iovines .band .logo svg { height: 30px; }
.band .nfc { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; color: var(--logo); opacity: .9; }

/* Mise en page « officiel » (Sénégal) : bandeau avec médaillon */
.band.officiel { flex-direction: column; gap: 14px; padding: 34px 24px 28px; }
.medaillon {
  width: 86px; height: 104px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 0 5px rgba(255,255,255,.05);
}
.medaillon img { width: 62px; height: auto; }
.band-lignes { text-align: center; text-transform: uppercase; }
.band-lignes .l1 { font-size: 13px; letter-spacing: .34em; font-weight: 500; margin-right: -.34em; }
.band-lignes .l2 { font-size: 10px; letter-spacing: .24em; opacity: .75; margin-top: 5px; margin-right: -.24em; }

.name {
  margin: 34px 0 0; font-weight: 500; line-height: 1.08; letter-spacing: .005em;
  font-family: var(--serif); font-size: clamp(36px, 10.5vw, 44px);
  text-wrap: balance;
}
.l-sombre .name { margin-top: 30px; }
.f-sans .name { font-family: var(--sans); font-weight: 600; font-size: clamp(28px, 8vw, 33px); letter-spacing: -.015em; }
.civilite { display: block; font-size: .5em; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; font-family: var(--sans); font-weight: 500; margin-right: -.3em; }

.org {
  margin: 12px 0 0; font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--texte-doux); font-weight: 500; margin-right: -.26em;
}
.titre { margin: 8px 0 0; color: var(--texte-doux); font-size: 15px; }
.rule { width: 56px; height: 1px; background: var(--filet, var(--accent)); margin: 24px auto 0; }
.f-sans .rule { height: 2px; width: 28px; }

/* --- Bouton principal ------------------------------------------------------ */
.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 30px 0 14px; min-height: 56px; padding: 0 20px; border-radius: 12px;
  background: var(--bouton); color: var(--bouton-texte);
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,.55);
}
.save svg { width: 19px; height: 19px; }
.save:hover { opacity: .92; }
.save:active { transform: scale(.98); }

/* --- Liste des contacts ---------------------------------------------------- */
.contacts { list-style: none; margin: 0; padding: 0; }
.contacts li + li { border-top: 1px solid var(--ligne); }
.row {
  display: flex; align-items: center; gap: 16px; padding: 16px 4px; min-height: 68px;
  border-radius: 10px; transition: background-color .18s ease, transform .18s ease;
}
a.row:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
a.row:active { transform: scale(.985); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ic { flex: none; width: 22px; height: 22px; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.ic svg { width: 21px; height: 21px; }
.ic svg.brand { width: 18px; height: 18px; }
.txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbl { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--libelle, var(--accent)); font-weight: 600; }
.val { font-size: 16px; overflow-wrap: anywhere; }
.go { flex: none; width: 16px; height: 16px; color: var(--texte-doux); opacity: .55; }
.go svg { width: 16px; height: 16px; }

/* --- Sections libres (ex. « Le groupe » d'Ancora) -------------------------- */
.section { margin-top: 34px; text-align: center; }
.section h2 {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; color: var(--accent);
}
.section h2::before, .section h2::after { content: ''; flex: 1; height: 1px; background: var(--ligne); }
.section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.section .n { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.section .d { font-size: 12px; letter-spacing: .06em; color: var(--texte-doux); margin-top: 3px; }

/* --- Pied de page ---------------------------------------------------------- */
.foot { margin-top: auto; padding-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px;
  border: 0; background: none; color: var(--texte-doux); font: inherit; font-size: 13px; cursor: pointer;
  transition: background-color .18s ease;
}
.share svg { width: 15px; height: 15px; }
.share:hover { background: color-mix(in srgb, var(--texte) 6%, transparent); }
.foot small { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--texte-doux); opacity: .7; }

/* --- Focus clavier visible ------------------------------------------------- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Sénégal sur grand écran : bandeau à gauche, comme la carte ------------ */
@media (min-width: 760px) {
  .l-officiel .card { max-width: 760px; display: grid; grid-template-columns: 250px 1fr; }
  .l-officiel .band.officiel { min-height: 100%; justify-content: center; }
  .l-officiel .medaillon { width: 104px; height: 126px; }
  .l-officiel .medaillon img { width: 76px; }
  .l-officiel .main { display: flex; flex-direction: column; padding-top: 18px; }
}

/* --- Pages neutres (accueil, 404) ------------------------------------------ */
.neutre { display: flex; align-items: center; justify-content: center; text-align: center; padding: 32px; }
.neutre .box { max-width: 380px; }
.neutre .mark { width: 40px; height: 1px; background: var(--filet, var(--accent)); margin: 0 auto 28px; }
.neutre h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 0 0 14px; }
.neutre p { color: var(--texte-doux); margin: 0; font-size: 15px; }

/* --- Apparition en fondu (désactivée si l'utilisateur limite les animations) - */
@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
