/* =========================================================
   Rawaq — feuille de styles
   Esprit « association professionnelle » : fond blanc, couleurs
   franches par public, illustrations, cartes à liseré coloré.
   Compatible FR (ltr) et AR (rtl) grâce aux propriétés logiques.
   ========================================================= */

:root {
  --bleu: #1F6FB2;
  --bleu-fonce: #154F80;
  --marine: #10345C;
  --violet: #6A2C80;
  --rouge: #C8302C;
  --vert: #23806A;
  --orange: #C85A17;
  --jaune: #F2B233;

  --encre: #1E2430;
  --gris: #57606F;
  --trait: #DDE3EA;
  --fond-doux: #F2F7FA;
  --blanc: #FFFFFF;

  --f-texte: 'Roboto', system-ui, sans-serif;
  --f-titre: 'Lexend', 'Roboto', sans-serif;
  --f-ar: 'Tajawal', 'Roboto', sans-serif;

  --rayon: 6px;
  --largeur: 1180px;
  --ombre: 0 2px 6px rgba(16, 52, 92, .12);
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; font-family: var(--f-texte); color: var(--encre); background-color: var(--blanc); line-height: 1.55; }
html[dir="rtl"] body, [lang="ar"] { font-family: var(--f-ar); }
html[dir="rtl"] [lang="fr"] { font-family: var(--f-texte); }

a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }

.container { max-width: var(--largeur); margin-inline: auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--jaune); color: var(--encre); padding: 10px 14px; z-index: 10; }
.skip:focus { top: 8px; }
.center { text-align: center; margin: 32px 0 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px; border-radius: 4px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; color: #fff;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(.9); color: #fff; }
.btn--block { width: 100%; }
.btn--bleu { background-color: var(--bleu); }
.btn--violet { background-color: var(--violet); }
.btn--rouge { background-color: var(--rouge); }
.btn--vert { background-color: var(--vert); }
.btn--jaune { background-color: var(--jaune); color: var(--encre); }
.btn--jaune:hover { color: var(--encre); }
.btn--line { background: transparent; border-color: var(--bleu); color: var(--bleu); }
.btn--line:hover { background-color: #EAF2FA; color: var(--bleu-fonce); filter: none; }

/* ---------- Choix de la langue ---------- */
.lang-switch { display: flex; gap: 6px; }
.lang-switch a { min-height: 32px; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; border: 1px solid var(--trait); border-radius: 20px; color: var(--marine); text-decoration: none; font-weight: 500; }
.lang-switch a:hover { border-color: var(--bleu); color: var(--bleu); }
.lang-switch a[aria-current] { background-color: var(--bleu); border-color: var(--bleu); color: #fff; font-weight: 700; }

/* ---------- En-tête ---------- */
.header { background-color: var(--blanc); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 0; padding-block: 6px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.logo__img { display: block; flex: none; width: 58px; height: 58px; padding: 7px; object-fit: contain; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(23, 98, 79, .18); }
@media (max-width: 520px) { .logo__img { width: 46px; height: 46px; padding: 5px; } }
.logo__icon[hidden] { display: none; }
.logo__txt { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.logo__nom { font-family: var(--f-titre); font-size: 19px; font-weight: 600; color: var(--bleu); white-space: nowrap; }
.logo__nom[lang="ar"] { font-family: var(--f-ar); font-weight: 800; font-size: 28px; }
.logo__sous { font-family: var(--f-ar); font-size: 16px; font-weight: 700; color: var(--violet); }
.logo__sous[lang="fr"] { font-family: var(--f-titre); font-size: 15px; font-weight: 600; }


.subnav { background-color: var(--bleu); }
.subnav__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 56px; padding-block: 8px; }

/* Couleur de chaque bouton */
.subnav__btn { --c: var(--bleu); --c-doux: #E5EFF8; }
.subnav__btn--violet { --c: var(--violet); --c-doux: #F1E8F5; }
.subnav__btn--rouge  { --c: var(--rouge);  --c-doux: #FBE7E6; }
.subnav__btn--vert   { --c: var(--vert);   --c-doux: #E2F3EC; }
.subnav__btn--orange { --c: var(--orange); --c-doux: #FCEADD; }

.subnav__btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: 15px; font-weight: 700; color: var(--marine);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.subnav__btn:hover { transform: translateY(-2px); }
.subnav__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
/* Nombre dans le bouton */
.subnav__count {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--c); color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.subnav--doux .subnav__btn:hover .subnav__count, .subnav--doux .subnav__btn[aria-current] .subnav__count { background-color: #fff; color: var(--c); }

/* A. Pastilles : blanches, bord coloré, icône dans un rond de couleur */
.subnav--pastilles .subnav__btn {
  min-height: 44px; padding: 0 18px 0 5px; border-radius: 22px;
  background-color: #fff; border: 2px solid var(--c-doux); box-shadow: 0 2px 6px rgba(16,52,92,.18);
}
html[dir="rtl"] .subnav--pastilles .subnav__btn { padding: 0 5px 0 18px; }
.subnav--pastilles .subnav__icon { width: 32px; height: 32px; border-radius: 50%; background-color: var(--c); color: #fff; }
.subnav--pastilles .subnav__btn:hover, .subnav--pastilles .subnav__btn[aria-current] { border-color: var(--c); color: var(--c); box-shadow: 0 6px 14px rgba(16,52,92,.25); }

/* B. Doux : barre claire, pastilles teintées de leur couleur */
.subnav--doux { background-color: #fff; border-block: 1px solid var(--trait); }
.subnav--doux .subnav__btn {
  min-height: 44px; padding: 0 10px 0 14px; border-radius: 22px;
  background-color: var(--c-doux); color: var(--c); border: 1.5px solid transparent;
}
html[dir="rtl"] .subnav--doux .subnav__btn { padding: 0 14px 0 10px; }
.subnav--doux .subnav__btn:hover, .subnav--doux .subnav__btn[aria-current] { background-color: var(--c); color: #fff; }
.subnav--doux .subnav__search { border: 1px solid var(--trait); }

/* C. Cartes : grandes tuiles blanches, icône au-dessus, liseré coloré en bas */
.subnav--cartes .subnav__in { padding-block: 14px; }
.subnav--cartes .subnav__btn {
  flex-direction: column; justify-content: center; gap: 6px; min-width: 130px; min-height: 76px; padding: 10px 16px 8px;
  border-radius: 12px; background-color: #fff; border-bottom: 4px solid var(--c); box-shadow: 0 2px 6px rgba(16,52,92,.18);
}
.subnav--cartes .subnav__icon { width: 34px; height: 34px; border-radius: 10px; background-color: var(--c-doux); color: var(--c); }
.subnav--cartes .subnav__btn:hover, .subnav--cartes .subnav__btn[aria-current] { box-shadow: 0 8px 18px rgba(16,52,92,.28); color: var(--c); }

.subnav__search { display: flex; margin-inline-start: auto; background: #fff; border-radius: 22px; overflow: hidden; padding-inline-start: 6px; }
.subnav__search input { border: 0; padding: 0 12px; min-height: 42px; width: 240px; font: inherit; font-size: 14px; }
.subnav__search input:focus { outline: none; }
.subnav__search button { border: 0; background: #fff; color: var(--bleu); width: 40px; cursor: pointer; }

/* ---------- Messages ---------- */
.notice { padding: 10px 0; font-size: 14px; font-weight: 500; }
.notice--demo { background-color: #FFF4D6; color: #6B4A00; }
.notice--succes { background-color: #E2F3EC; color: #145845; }
.notice--erreur { background-color: #FBE4E3; color: #8A1F1C; }

/* ---------- Introduction ---------- */
.intro { padding-block: 0 28px; }
/* Illustration centrée sous les boutons, puis le texte */
.intro__illus { margin: 0 auto 16px; max-width: 640px; padding: 6px 20px 8px; background-color: var(--fond-doux); border-radius: 0 0 12px 12px; }
.intro__illus img { width: 100%; }
.intro__title, .section-title__main {
  margin: 0; font-family: var(--f-titre); font-weight: 700; text-transform: uppercase;
  color: var(--marine); font-size: 24px; letter-spacing: .02em;
}
html[dir="rtl"] .intro__title, html[dir="rtl"] .section-title__main { font-family: var(--f-ar); font-weight: 800; font-size: 28px; }
.intro__lead { margin: 10px 0 0; font-size: 19px; font-weight: 500; color: var(--marine); max-width: 1000px; line-height: 1.6; }


/* ---------- Diaporama : bande d'images côte à côte, même hauteur ---------- */
.diapo { position: relative; margin: 14px 0 18px; }
.diapo__piste {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; height: 300px; width: 100%; border-radius: 12px;
}
.diapo__piste::-webkit-scrollbar { display: none; }
.diapo__piste:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; }
/* Exactement 2 images visibles à la fois (1 sur téléphone) */
.diapo__item { flex: 0 0 calc((100% - 12px) / 2); min-width: 0; height: 100%; margin: 0; scroll-snap-align: start; }
.diapo__img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 2px 8px rgba(16,52,92,.15); }
.diapo__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--marine); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: background-color .15s ease; z-index: 1;
}
.diapo__nav:hover { background: #fff; }
.diapo__nav--prec { inset-inline-start: 10px; }
.diapo__nav--suiv { inset-inline-end: 10px; }
html[dir="rtl"] .diapo__nav svg { transform: scaleX(-1); }
.diapo__points { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.diapo__point { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: #C9D3DE; cursor: pointer; }
.diapo__point[aria-current] { background: var(--vert); width: 24px; border-radius: 5px; }
/* Une image à la fois (réglé dans BLM, ou une seule image) : toute la largeur, un peu plus haute */
.diapo--une .diapo__item { flex-basis: 100%; }
.diapo--une .diapo__piste { height: 360px; }
@media (max-width: 640px) { .diapo__piste, .diapo--une .diapo__piste { height: 200px; } .diapo__item { flex-basis: 100%; } .diapo__nav { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { .diapo__piste { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
.band { padding-block: 40px; }
.band--soft { background-color: var(--fond-doux); }
.section { padding-block: 40px; }
.section--top0 { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.section__head--center { justify-content: center; text-align: center; }
.section-title { display: flex; flex-direction: column; gap: 2px; }
.section-title__alt { font-size: 15px; color: var(--gris); font-weight: 500; }
.section__lead { margin: 8px 0 0; color: var(--gris); }

/* ---------- Livres ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.book { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); display: flex; flex-direction: column; overflow: hidden; }
.book__cover { display: block; text-decoration: none; padding: 20px 70px 16px; background-color: #F7F9FB; border-bottom: 1px solid var(--trait); }
.book__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.book__title { margin: 0; font-size: 19px; line-height: 1.3; }
.book__title a { color: var(--marine); text-decoration: none; }
.book__title a:hover { color: var(--bleu); text-decoration: underline; }
.book__sub { margin: -4px 0 0; font-size: 14px; color: var(--marine); }
.book__meta { margin: 0; font-size: 14px; color: var(--gris); }
.book__isbn { margin: 0; font-size: 12px; color: var(--gris); direction: ltr; text-align: start; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .book__isbn { text-align: end; }
.book__prices { margin: 4px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.book__prices div { background-color: var(--fond-doux); border-radius: 4px; padding: 6px 10px; }
.book__prices dt { font-size: 11px; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.book__prices dd { margin: 0; font-weight: 700; }
.book__net dd { color: var(--vert); }
.book__order { display: flex; gap: 8px; margin-top: auto; }
.book__order .btn { flex: 1; padding: 0 12px; }
.book > .book__body > .btn { margin-top: auto; }

.cover {
  aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: space-between; text-align: center;
  padding: 22px 14px 14px; border-radius: 2px 6px 6px 2px; color: #fff;
  box-shadow: inset 7px 0 0 rgba(0,0,0,.15), 4px 6px 14px rgba(16,52,92,.25);
  font-family: var(--f-titre); position: relative;
}
html[dir="rtl"] .cover { border-radius: 6px 2px 2px 6px; box-shadow: inset -7px 0 0 rgba(0,0,0,.15), -4px 6px 14px rgba(16,52,92,.25); }
.cover::after { content: ""; position: absolute; inset-inline: 14px; bottom: 34%; height: 2px; background: currentColor; opacity: .5; }
.cover--clair { color: var(--encre); }
.cover__title { font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover__title[lang="ar"] { font-family: var(--f-ar); font-size: 22px; font-weight: 800; }
.cover__author { font-family: var(--f-texte); font-size: 12px; overflow-wrap: anywhere; }
.cover-wrap { position: relative; display: block; }
.cover-wrap .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 6px 6px 2px; box-shadow: 4px 6px 14px rgba(16,52,92,.25); }

.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.badge--ok { background-color: #E2F3EC; color: #145845; }
.badge--warn { background-color: #FFF0CC; color: #6B4A00; }
.badge--ko { background-color: #FBE4E3; color: #8A1F1C; }
.badge--info { background-color: #E5EFF8; color: var(--bleu-fonce); }
.badge--line { border: 1px solid var(--trait); color: var(--gris); }

.qty { display: flex; border: 1px solid var(--trait); border-radius: 4px; overflow: hidden; flex: none; }
.qty button { width: 36px; min-height: 44px; border: 0; background-color: var(--fond-doux); font: inherit; font-weight: 700; color: var(--marine); cursor: pointer; flex: none; }
.qty button:hover { background-color: #E1ECF4; }
.qty input { width: 44px; flex: none; min-width: 0; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Raccourcis « En savoir plus » ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.shortcut {
  --c: var(--bleu);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 28px 18px 22px; border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff;
  text-decoration: none; color: var(--encre); box-shadow: var(--ombre); transition: transform .15s ease, border-color .15s ease;
}
.shortcut:hover { transform: translateY(-3px); border-color: var(--c); color: var(--encre); }
.shortcut--violet { --c: var(--violet); }
.shortcut--vert { --c: var(--vert); }
.shortcut--rouge { --c: var(--rouge); }
.shortcut--orange { --c: var(--orange); }
.shortcut__icon { width: 72px; height: 72px; border-radius: 50%; background-color: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.shortcut strong { font-size: 17px; color: var(--c); }
.shortcut__txt { font-size: 14px; color: var(--gris); flex: 1; }
.shortcut__more { font-size: 14px; font-weight: 700; color: var(--c); }

/* ---------- Commande rapide / À paraître ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 20px; }
.panel { --c: var(--vert); margin: 0; padding: 28px; background: #fff; border: 1px solid var(--trait); border-top: 8px solid var(--c); box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 12px; }
.panel--violet { --c: var(--violet); }
.panel__title { margin: 0; font-family: var(--f-titre); font-size: 22px; color: var(--c); }
html[dir="rtl"] .panel__title { font-family: var(--f-ar); font-weight: 800; }
.panel__help { font-size: 14px; color: var(--gris); }
.panel textarea { font-family: ui-monospace, Consolas, monospace; font-size: 14px; padding: 12px; border: 1px solid var(--trait); border-radius: 4px; resize: vertical; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panel > .btn { align-self: flex-start; margin-top: auto; }
.upcoming { list-style: none; margin: 0; padding: 0; }
.upcoming li { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.upcoming li > span:last-child { display: flex; flex-direction: column; }
.upcoming small { color: var(--gris); }
.upcoming__date { flex: none; min-width: 84px; padding: 4px 8px; border-radius: 4px; background-color: #F1E8F5; color: var(--violet); font-weight: 700; font-size: 13px; text-align: center; }

/* ---------- Répertoire ---------- */
.directory { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 20px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.directory__search { display: flex; gap: 10px; }
.directory__search input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--trait); border-radius: 4px; padding: 0 14px; font: inherit; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips legend { float: inline-start; font-weight: 700; font-size: 14px; color: var(--marine); margin-inline-end: 8px; padding: 0; min-width: 90px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--trait); font-size: 14px; cursor: pointer; background: #fff; }
.chip input:checked + span { background-color: var(--bleu); border-color: var(--bleu); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--jaune); outline-offset: 2px; }

.publishers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.publisher { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--trait); border-inline-start: 5px solid var(--c); border-radius: 4px; text-decoration: none; color: var(--encre); }
.publisher:hover { box-shadow: var(--ombre); color: var(--encre); }
.publisher__initial { width: 44px; height: 44px; flex: none; border-radius: 50%; background-color: var(--c); color: #fff; font-family: var(--f-titre); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.publisher__txt { display: flex; flex-direction: column; line-height: 1.35; }
.publisher__txt strong { color: var(--marine); }
.publisher__txt span { color: var(--gris); font-size: 14px; }
.publisher__txt small { color: var(--gris); }

/* ---------- En-tête de page intérieure ---------- */
.page-head { padding-block: 18px 28px; }
.fil { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--gris); margin-bottom: 14px; }
.fil a { color: var(--bleu); text-decoration: none; }
.fil a:hover { text-decoration: underline; }

/* Formulaire de filtres */
.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 18px; padding: 16px; background: var(--fond-doux); border-radius: var(--rayon); }
.filtres__champ { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; min-width: 0; }
.filtres__champ--large { flex: 3 1 280px; }
.filtres__champ label { font-size: 13px; font-weight: 700; color: var(--marine); }
.filtres input, .filtres select { min-height: 44px; border: 1px solid var(--trait); border-radius: 4px; padding: 0 12px; font: inherit; background: #fff; }
.filtres__actions { display: flex; gap: 8px; }
.resultat { margin: 0 0 16px; font-weight: 700; color: var(--marine); }
.vide { text-align: center; padding: 40px 16px; background: #fff; border: 1px dashed var(--trait); border-radius: var(--rayon); }
.vide p { margin: 0 0 16px; color: var(--gris); }

/* Cartes éditeurs */
.eds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.ed { display: flex; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--trait); border-top: 5px solid var(--c); border-radius: var(--rayon); box-shadow: var(--ombre); }
.ed__logo, .fiche-ed__logo {
  position: relative; flex: none; width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 12%, #fff); display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.ed__logo img, .fiche-ed__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.ed__initiale { font-family: var(--f-titre); font-size: 34px; font-weight: 700; color: var(--c); }
.ed__corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.ed__nom { margin: 0; font-size: 18px; line-height: 1.3; }
.ed__nom a { color: var(--marine); text-decoration: none; }
.ed__nom a:hover { color: var(--bleu); text-decoration: underline; }
.ed__lieu { margin: 0; display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--gris); }
.ed__desc { margin: 0; font-size: 14px; color: var(--encre); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed__pied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.ed__titres { font-size: 14px; color: var(--gris); }
.ed__titres strong { color: var(--c); font-size: 16px; }
.ed__lien { font-size: 14px; font-weight: 700; color: var(--c); text-decoration: none; }
.ed__lien:hover { text-decoration: underline; }

/* Fiche éditeur */
.fiche-ed { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 320px); gap: 24px; align-items: start; }
.fiche-ed__logo { width: 120px; height: 120px; border-top: 5px solid var(--c); }
.fiche-ed__logo .ed__initiale { font-size: 48px; }
.fiche-ed__gauche { display: flex; flex-direction: column; gap: 16px; width: 120px; }
.fiche-ed__equipe { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.fiche-ed__equipe .personne { display: flex; flex-direction: column; gap: 2px; }
.personne__photo { width: 120px; height: 120px; object-fit: cover; border-radius: var(--rayon); margin-bottom: 6px; background: var(--fond-doux); }
.fiche-ed__equipe dt { font-size: 12px; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.fiche-ed__equipe dd { margin: 2px 0 0; font-weight: 600; color: var(--marine); overflow-wrap: anywhere; }
.fiche-ed__nom { margin: 0 0 6px; font-family: var(--f-titre); font-size: 30px; color: var(--marine); line-height: 1.2; }
html[dir="rtl"] .fiche-ed__nom { font-family: var(--f-ar); font-weight: 800; }
.fiche-ed__meta { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--gris); }
.fiche-ed__desc { line-height: 1.7; max-width: 70ch; }
.fiche-ed__desc p { margin: 0 0 12px; }
.fiche-ed__desc p:last-child { margin-bottom: 0; }
.fiche-ed__contact { padding: 18px; background: var(--fond-doux); border-radius: var(--rayon); }
.fiche-ed__contact h2 { margin: 0 0 10px; font-size: 16px; color: var(--marine); }
.fiche-ed__contact dl { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.fiche-ed__contact dt { font-size: 12px; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.fiche-ed__contact dd { margin: 2px 0 0; overflow-wrap: anywhere; }
html[dir="rtl"] .fiche-ed__contact dd[dir="ltr"] { text-align: right; }
@media (max-width: 900px) { .fiche-ed { grid-template-columns: auto minmax(0, 1fr); } .fiche-ed__contact { grid-column: 1 / -1; } }
@media (max-width: 520px) { .fiche-ed { grid-template-columns: 1fr; } .fiche-ed__gauche { width: auto; flex-direction: row; flex-wrap: wrap; align-items: flex-start; } .personne__photo { width: 90px; height: 90px; } .ed { flex-direction: column; } }

/* ---------- Newsletter ---------- */
.newsletter { background-color: var(--marine); color: #fff; }
.newsletter__in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: 44px; }
.newsletter__title { margin: 0 0 6px; font-family: var(--f-titre); font-size: 24px; }
html[dir="rtl"] .newsletter__title { font-family: var(--f-ar); font-weight: 800; }
.newsletter p { margin: 0; color: #D5E2EF; }
.newsletter__form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter__form input { min-height: 44px; min-width: 280px; border: 0; border-radius: 4px; padding: 0 14px; font: inherit; }

/* ---------- Pied de page ---------- */
.footer { background-color: #fff; color: var(--encre); }
.footer__rainbow { display: grid; grid-template-columns: repeat(4, 1fr); height: 6px; }
.footer__rainbow span:nth-child(1) { background: var(--bleu); }
.footer__rainbow span:nth-child(2) { background: var(--violet); }
.footer__rainbow span:nth-child(3) { background: var(--rouge); }
.footer__rainbow span:nth-child(4) { background: var(--vert); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 48px 32px; }
.footer__grid > * { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer__grid strong { color: var(--marine); font-size: 15px; }
.footer__grid a { color: var(--gris); text-decoration: none; }
.footer__grid a:hover { color: var(--bleu); text-decoration: underline; }
.footer__logo { font-family: var(--f-titre); font-size: 20px; font-weight: 600; color: var(--bleu); }
.footer__logo-ar { font-family: var(--f-ar); font-size: 20px; font-weight: 700; color: var(--violet); margin-top: -6px; }
.footer__brand p { margin: 0; color: var(--gris); line-height: 1.6; }
.footer__bottom { background-color: var(--fond-doux); font-size: 13px; color: var(--gris); }
.footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 14px; }
.footer__bottom a { color: var(--gris); }

/* ---------- Couleurs du bandeau du logo ---------- */
/* Fond sombre : textes et boutons de langue en clair */
.header--marine .header__bandeau,
.header--degrade .header__bandeau,
.header--vert .header__bandeau { color: #fff; }
.header--marine .header__bandeau  { background-color: var(--marine); }
.header--degrade .header__bandeau { background: linear-gradient(100deg, var(--marine) 0%, var(--bleu) 55%, var(--violet) 100%); }
.header--vert .header__bandeau    { background-color: #3A8F76; }
.header--vert .logo__sous { color: #FFF1C9; }   /* crème : plus lisible que le jaune sur ce vert */
/* Vert très clair, texte foncé */
.header--vert-clair .header__bandeau { background-color: #E3F1EA; border-bottom: 2px solid #3A8F76; }
.header--vert-clair .logo__nom { color: #17624F; }
.header--vert-clair .lang-switch a { background-color: #fff; }
.header--vert-clair .lang-switch a[aria-current] { background-color: #3A8F76; border-color: #3A8F76; color: #fff; }
.header--marine .logo__nom, .header--degrade .logo__nom, .header--vert .logo__nom { color: #fff; }
.header--marine .logo__sous, .header--degrade .logo__sous { color: var(--jaune); }
.header--marine .logo__icon, .header--degrade .logo__icon, .header--vert .logo__icon { background: #fff; border-radius: 10px; padding: 4px 3px; }
.header--marine .lang-switch a, .header--degrade .lang-switch a, .header--vert .lang-switch a { color: #fff; border-color: rgba(255,255,255,.45); }
.header--marine .lang-switch a:hover, .header--degrade .lang-switch a:hover, .header--vert .lang-switch a:hover { border-color: #fff; color: #fff; }
.header--marine .lang-switch a[aria-current], .header--degrade .lang-switch a[aria-current], .header--vert .lang-switch a[aria-current] { background-color: #fff; border-color: #fff; color: var(--marine); }
/* Fond clair et chaleureux */
.header--sable .header__bandeau { background-color: #F6EFE1; border-bottom: 3px solid var(--jaune); }

/* ---------- Écrans moyens et mobiles ---------- */
@media (max-width: 1180px) {
  .header__in { min-height: 0; padding-block: 16px; }
  .subnav__btn { flex: 1 1 auto; }
  .subnav__search { width: 100%; margin: 0 0 10px; }
  .subnav__search input { width: auto; flex: 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .header__in { gap: 10px; flex-wrap: wrap; }
  .logo { gap: 8px; min-width: 0; }
  .logo__icon { width: 44px; height: 38px; flex: none; }
  .logo__nom { font-size: 17px; }
  .logo__nom[lang="ar"] { font-size: 22px; }
  .logo__sous { font-size: 15px; }
  .intro__lead { font-size: 17px; }
  .subnav__btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .directory__search { flex-direction: column; }
  .newsletter__form input { min-width: 0; flex: 1; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Texte défilant (géré dans BLM, entre deux dates) ---------- */
/* Bande alignée sur la largeur du contenu (comme le diaporama), centrée dans la page */
.defile-cadre { margin-top: 12px; }
.defile { overflow: hidden; background-color: var(--jaune); color: var(--marine); border-radius: 10px; box-shadow: 0 2px 6px rgba(16, 52, 92, .12); }

/* Chaque texte garde sa couleur de bande et d'écriture (choisies dans BLM) */
.defile { position: relative; }
/* Le texte entre par la droite de la bande et sort par la gauche (vitesse réglée par assets/js/app.js) */
.defile__piste { display: flex; width: max-content; padding-inline-start: var(--defile-largeur, 100vw); animation: defile var(--defile-duree, 25s) linear infinite; }
.defile__groupe { display: flex; margin: 0; white-space: nowrap; }
.defile__texte { display: inline-flex; align-items: center; gap: 8px; padding: 8px 64px 8px 24px; font-weight: 700; font-size: 15px; }
html[dir="rtl"] .defile__texte { padding: 8px 24px 8px 64px; }
/* Police, style et taille (choisis dans BLM) */
.defile__texte--texte { font-family: var(--f-texte); }
.defile__texte--titre { font-family: var(--f-titre); }
.defile__texte--classique { font-family: 'Amiri', Georgia, serif; }
.defile__texte[lang="ar"]:not(.defile__texte--classique) { font-family: var(--f-ar); }
.defile__texte--normal { font-weight: 400; font-style: normal; }
.defile__texte--gras { font-weight: 700; font-style: normal; }
.defile__texte--italique { font-weight: 400; font-style: italic; }
.defile__texte--gras-italique { font-weight: 700; font-style: italic; }
.defile__texte--petite { font-size: 13px; }
.defile__texte--normale { font-size: 15px; }
.defile__texte--grande { font-size: 18px; }
.defile__texte[lang="ar"].defile__texte--normale { font-size: 17px; }
.defile__texte[lang="ar"].defile__texte--grande { font-size: 20px; }
.defile:hover .defile__piste, .defile:focus-within .defile__piste { animation-play-state: paused; }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-100%); } }
html[dir="rtl"] .defile__piste { animation-name: defile-rtl; }
@keyframes defile-rtl { from { transform: translateX(0); } to { transform: translateX(100%); } }
/* Mouvement réduit : pas de défilement, les textes passent à la ligne */
@media (prefers-reduced-motion: reduce) {
  .defile__piste { animation: none; width: auto; padding-inline-start: 0; }
  .defile__groupe { flex-wrap: wrap; justify-content: center; white-space: normal; padding-inline: 24px; }
}
