/* =========================================================
   Tussna Academy — feuille de style principale
   Palette provisoire — à remplacer par le moodboard définitif
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=Amiri:wght@400;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette moodboard officielle — Mother of Pearl / Mystic Navy / Red Inferno */
  --ink: #13273f;
  --ink-soft: #2c4463;
  --sand: #e9d4c3;
  --sand-deep: #ddc3ad;
  --paper: #f7f1e8;
  --gold: #4e0000;          /* bordeaux royal — accent principal (ex. "Parcours individuels") */
  --gold-soft: #8a2a2a;
  --terracotta: #4e0000;    /* alias — même bordeaux, conservé pour compat. des classes existantes */
  --terracotta-deep: #350000;
  --terracotta-soft: #c79a94;
  --bordeaux: #4e0000;
  --bordeaux-soft: #8a2a2a;
  --bordeaux-deep: #350000;
  --text: #1c2838;
  --text-muted: #5c6a7a;
  --white: #ffffff;
  --border: rgba(19, 39, 63, 0.14);

  --font-display: 'Playfair Display', 'Amiri', serif;
  --font-body: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif;

  --radius: 6px;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 700; }

p { margin: 0 0 1.1em; color: var(--text); }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.muted { color: var(--text-muted); }

a { color: var(--ink); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--sand); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink p { color: var(--sand-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Couleur reprise du fond du logo Tussna, étalée sur toute la barre de menu */
  background: rgba(213, 217, 221, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1320px;
  margin: 0 auto;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo img { height: 59px; width: auto; display: block; border-radius: 6px; }
.logo__text { display: flex; flex-direction: column; line-height: 1; justify-content: center; }
.logo__name { display: none; }
.logo__by {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
}
html[dir="rtl"] .logo__name, html[dir="rtl"] .logo__by { text-align: right; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; gap: 13px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--gold);
}

/* ---------- Menu déroulant (sous-parties au survol) ---------- */
.nav__links li { position: relative; }
.nav__links .dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 20px 44px rgba(19, 39, 63, 0.16);
  padding: 10px;
  margin: 10px 0 0;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.nav__links li.has-dropdown:hover .dropdown,
.nav__links li.has-dropdown:focus-within .dropdown {
  opacity: 1;
  transform: translate(-50%, 2px);
  pointer-events: auto;
}
.dropdown li { margin: 0; }
.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: none !important;
  white-space: nowrap;
}
.dropdown a:hover { background: var(--sand); color: var(--ink); }
.dropdown__soon {
  display: block;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.65;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .nav__links .dropdown { transition: none; }
}
@media (max-width: 900px) {
  .nav__links .dropdown { position: static; transform: none; box-shadow: none; border: none; opacity: 1; pointer-events: auto; display: none; margin-top: 4px; }
  .nav__links li.has-dropdown:hover .dropdown, .nav__links li.has-dropdown:focus-within .dropdown { transform: none; }
}

.lang-switch { display: flex; gap: 8px; font-size: 0.85rem; }
.lang-switch a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}
.lang-switch a[aria-current="page"] {
  color: var(--ink);
  background: var(--sand-deep);
  font-weight: 600;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #0d1620; }

.btn--gold { background: var(--gold); color: var(--paper); }
.btn--gold:hover { background: var(--bordeaux-deep); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--ghost-light { background: transparent; color: var(--paper); border-color: var(--sand-deep); }
.btn--ghost-light:hover { background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  text-align: left;
}
.hero__kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.card--pillar {
  position: relative;
  padding-top: 40px;
}
.card--pillar .pillar-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-soft);
  position: absolute;
  top: 18px;
  right: 28px;
}
.pillar-art {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 0 18px;
}
html[dir="rtl"] .pillar-art { transform: scaleX(-1); }

.module-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.module-row:last-child { border-bottom: none; }
.module-row__num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  min-width: 2em;
}
.module-row__body { flex: 1; }
.module-row__meta { font-size: 0.85rem; color: var(--text-muted); }

.format-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.format-card h3 { margin-bottom: 10px; }
.format-card ul { margin: 0 0 20px; padding-left: 20px; color: var(--text-muted); font-size: 0.92rem; }
.format-card .btn { margin-top: auto; align-self: flex-start; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sand-deep);
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.badge--gold { background: var(--gold-soft); color: var(--paper); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--paper); margin-bottom: 6px; }
.cta-band p { color: var(--sand-deep); margin: 0; }

/* ---------- Forms ---------- */
.form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 680px;
}
.form-row { margin-bottom: 20px; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--text);
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
fieldset { border: none; padding: 0; margin: 0 0 20px; }
legend { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); padding: 0; margin-bottom: 10px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: auto; margin-top: 4px; }
.checkbox-row label { font-weight: 400; font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 24px; }

/* ---------- Hero plein écran dramatique (accueil) ---------- */
.hero--dramatic {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  overflow: hidden;
  padding: 0;
}
.hero--dramatic::before {
  /* Motif géométrique inspiré du zellige — discret, en arrière-plan */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23B8924A' stroke-width='1.2'%3E%3Cpath d='M60 0 L120 60 L60 120 L0 60 Z'/%3E%3Cpath d='M60 20 L100 60 L60 100 L20 60 Z'/%3E%3Ccircle cx='60' cy='60' r='14'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.hero--dramatic::after {
  /* Dégradé pour garder le texte lisible, plus sombre en bas à gauche */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 30%, rgba(184,146,74,0.18), transparent 55%),
              linear-gradient(135deg, rgba(13,22,32,0.4) 0%, rgba(22,33,46,0.92) 70%);
}
.hero--dramatic .container {
  position: relative;
  z-index: 2;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero--dramatic .hero__kicker { color: var(--gold-soft); }
.hero--dramatic h1 { color: var(--paper); max-width: 760px; }
.hero--dramatic .lead { color: var(--sand-deep); }

/* Variante claire : même structure (mesh animé, motif), fond clair, texte navy */
.hero--light { background: var(--paper); }
.hero--light::before { opacity: 0.08; }
.hero--light::after {
  background: radial-gradient(circle at 15% 25%, rgba(78,0,0,0.10), transparent 55%),
              linear-gradient(135deg, rgba(247,241,232,0.55) 0%, rgba(247,241,232,0.94) 75%);
}
.hero--light .hero-mesh { opacity: 0.4; }
.hero--light .hero__kicker { color: var(--bordeaux); }
.hero--light h1, .hero--light h2 { color: var(--ink); }
.hero--light .lead { color: var(--ink-soft); }
.hero--light .btn--ghost-light { color: var(--ink); border-color: var(--ink); }
.hero--light .btn--ghost-light:hover { background: var(--ink); color: var(--paper); }

/* ---------- Mosaïque / showcase (section "galerie") ---------- */
.showcase {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  gap: 16px;
}
.showcase__tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: var(--paper);
  isolation: isolate;
  text-decoration: none;
  cursor: pointer;
}
a.showcase__tile:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.showcase__tile::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background-size: 200% 200%;
  animation: tile-shimmer 9s ease-in-out infinite alternate;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.showcase__tile:hover::before { transform: scale(1.08); }
@keyframes tile-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase__tile::before { animation: none; }
}
.showcase__tile.showcase__tile--photo::before {
  /* L'image est posée directement en style inline sur l'élément (background-image),
     car un url() lu depuis une custom property se résout par rapport à la feuille CSS,
     pas par rapport à la page — d'où les chemins cassés si on le fait ici. */
  background-size: cover;
  background-position: center;
  animation: none;
}
.showcase__tile span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  position: relative;
  z-index: 1;
}
.showcase__tile svg {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 112px;
  height: 112px;
  opacity: 0.22;
  pointer-events: none;
}
.showcase__tile--6 svg { opacity: 0.3; stroke: var(--ink) !important; }
.showcase__tile--1 { grid-column: span 3; grid-row: span 2; }
.showcase__tile--1::before { background: linear-gradient(145deg, #13273f, #2c4463); }
.showcase__tile--2 { grid-column: span 3; }
.showcase__tile--2::before { background: linear-gradient(145deg, #4e0000, #7a2424); }
.showcase__tile--3 { grid-column: span 3; }
.showcase__tile--3::before { background: linear-gradient(145deg, #2c4463, #4e637f); }
.showcase__tile--4 { grid-column: span 2; grid-row: span 2; }
.showcase__tile--4::before { background: linear-gradient(145deg, #13273f, #3a5270); }
.showcase__tile--5 { grid-column: span 2; grid-row: span 2; }
.showcase__tile--5::before { background: linear-gradient(145deg, #4e0000, #350000); }
.showcase__tile--6 { grid-column: span 2; grid-row: span 2; }
.showcase__tile--6::before { background: linear-gradient(145deg, #ddc3ad, #e9d4c3); }
.showcase__tile--6 span { color: var(--ink); text-shadow: none; }

@media (max-width: 900px) {
  .showcase { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .showcase__tile--1, .showcase__tile--4, .showcase__tile--5, .showcase__tile--6 { grid-column: span 2; grid-row: span 1; }
  .showcase__tile--2, .showcase__tile--3 { grid-column: span 2; }
}

/* ---------- Reveal au scroll (animation motivée : apparition progressive) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--1 { transition-delay: 0.05s; }
.reveal--2 { transition-delay: 0.15s; }
.reveal--3 { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Cards carousel (effet "cartes qui s'ouvrent", façon Apple) ---------- */
.ac-carousel {
  position: relative;
  margin: 0 -24px;
  padding: 8px 24px 20px;
}
.ac-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
}
.ac-track::-webkit-scrollbar { height: 6px; }
.ac-track::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 999px; }

.ac-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(320px, 78vw);
  height: 420px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  color: var(--paper);
  font-family: inherit;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1), box-shadow 0.35s ease;
  box-shadow: 0 8px 24px rgba(22, 33, 46, 0.12);
}
.ac-card:hover, .ac-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(22, 33, 46, 0.22);
  outline: none;
}
.ac-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,33,46,0) 35%, rgba(22,33,46,0.82) 100%);
  z-index: 0;
}
.ac-card__badge, .ac-card__title, .ac-card__hint { position: relative; z-index: 1; }
.ac-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(251, 249, 244, 0.16);
  border: 1px solid rgba(251, 249, 244, 0.4);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.ac-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--paper);
}
.ac-card__hint {
  font-size: 0.85rem;
  color: var(--sand-deep);
  opacity: 0.9;
}

/* Fonds illustrés (en attendant de vraies photos) */
.ac-card--1 { background-image: linear-gradient(160deg, #13273f 10%, #2c4463 100%); }
.ac-card--2 { background-image: linear-gradient(160deg, #4e0000 10%, #7a2424 140%); }
.ac-card--3 { background-image: linear-gradient(160deg, #13273f 10%, #4e0000 130%); }
.ac-card__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.9;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
}
.ac-card__art svg { width: 88px; height: 88px; }

/* Overlay */
.ac-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 33, 46, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ac-overlay.is-open { opacity: 1; pointer-events: auto; }

.ac-overlay__panel {
  background: var(--paper);
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 48px;
  position: relative;
  transform: translateY(32px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1), opacity 0.35s ease;
}
.ac-overlay.is-open .ac-overlay__panel { transform: translateY(0); opacity: 1; }

@media (min-width: 760px) {
  .ac-overlay { align-items: center; }
  .ac-overlay__panel { border-radius: 20px; }
}

.ac-overlay__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--sand-deep);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ac-overlay__close:hover { background: var(--gold-soft); }

.ac-overlay__content ul { padding-left: 20px; color: var(--text-muted); }
.ac-overlay__content .btn { margin-top: 12px; }

html[dir="rtl"] .ac-overlay__close { right: auto; left: 20px; }
html[dir="rtl"] .ac-card { text-align: right; }
html[dir="rtl"] .ac-card__badge { align-self: flex-end; }

/* ---------- Hero mesh animé (fond Stripe-like) ---------- */
.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter: blur(70px);
  opacity: 0.6;
}
.mesh-blob {
  position: absolute;
  border-radius: 50%;
  animation: drift 20s ease-in-out infinite alternate;
}
.mesh-blob--1 { width: 460px; height: 460px; top: -120px; left: -80px; background: var(--bordeaux); animation-duration: 22s; }
.mesh-blob--2 { width: 380px; height: 380px; top: 20%; right: -100px; background: var(--sand-deep); animation-duration: 26s; animation-delay: -4s; }
.mesh-blob--3 { width: 520px; height: 520px; bottom: -220px; left: 30%; background: var(--ink-soft); animation-duration: 30s; animation-delay: -10s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.15); }
  100% { transform: translate(-40px, 30px) scale(0.95); }
}
.hero--dramatic::before { z-index: 1; }
.hero--dramatic::after { z-index: 1; }
.hero--dramatic .container { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .mesh-blob { animation: none; }
}

/* ---------- Bande de chiffres (données réelles du catalogue) ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat:nth-child(1) .stat__num { color: var(--bordeaux); }
.stat:nth-child(2) .stat__num { color: var(--ink); }
.stat:nth-child(3) .stat__num { color: var(--bordeaux-soft); }
.stat:nth-child(4) .stat__num { color: var(--ink-soft); }
.stat__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Bande déroulante (marquee) ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--sand);
}
.marquee__track {
  display: inline-flex;
  gap: 0;
  animation: marquee-scroll 32s linear infinite;
  width: max-content;
}
.marquee__item {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0 28px;
  position: relative;
}
.marquee__item::after {
  content: "✦";
  color: var(--terracotta);
  font-size: 0.7rem;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- Graphe de méthode (process, pas des statistiques fictives) ---------- */
.method-chart { display: flex; flex-direction: column; gap: 22px; }
.method-bar { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 20px; }
.method-bar__label { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.method-bar__track {
  height: 14px;
  background: var(--sand-deep);
  border-radius: 999px;
  overflow: hidden;
}
.method-bar__fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 1.1s cubic-bezier(.22,.61,.36,1);
}
.method-bar.is-visible .method-bar__fill { width: var(--fill, 100%); }
.method-bar:nth-child(1) .method-bar__fill { background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-soft)); }
.method-bar:nth-child(2) .method-bar__fill { background: linear-gradient(90deg, var(--ink), var(--ink-soft)); }
.method-bar:nth-child(3) .method-bar__fill { background: linear-gradient(90deg, var(--bordeaux-deep), var(--bordeaux)); }

html[dir="rtl"] .method-bar { grid-template-columns: 1fr 220px; }
html[dir="rtl"] .method-bar__label { text-align: right; }
html[dir="rtl"] .marquee__item::after { right: auto; left: 0; }

/* ---------- Sections teintées (palette moodboard visible) ---------- */
.section--terracotta { background: linear-gradient(160deg, #4e0000 0%, #350000 100%); color: var(--paper); }
.section--terracotta h2, .section--terracotta h3 { color: var(--paper); }
.section--terracotta p { color: var(--terracotta-soft); }
.section--gold { background: var(--sand-deep); }

/* ---------- Hero avec photo (pages intérieures) ---------- */
.hero--photo {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Voile noir progressif, léger : assombrissement doux côté texte (gauche), la photo reste nette et visible à droite */
  background: linear-gradient(100deg, rgba(10,12,16,0.7) 0%, rgba(10,12,16,0.52) 28%, rgba(10,12,16,0.26) 55%, rgba(10,12,16,0.06) 78%, rgba(10,12,16,0) 92%);
  z-index: 0;
}
.hero--photo .container { position: relative; z-index: 1; }
/* Parallax léger au mouvement de la souris (animation #1) — géré en JS, respecte prefers-reduced-motion */
.hero--photo { transition: background-position 0.2s ease-out; }
html[dir="rtl"] .hero--photo::before {
  background: linear-gradient(260deg, rgba(10,12,16,0.7) 0%, rgba(10,12,16,0.52) 28%, rgba(10,12,16,0.26) 55%, rgba(10,12,16,0.06) 78%, rgba(10,12,16,0) 92%);
}
/* Texte en clair sur le côté sombre du voile, taille resserrée pour rester bien dans la zone sombre */
.hero--photo .hero__kicker { color: var(--paper); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.hero--photo h1 { color: var(--paper); text-shadow: 0 2px 10px rgba(0,0,0,0.5); font-size: clamp(1.9rem, 3.1vw, 2.75rem); max-width: 620px; }
.hero--photo .lead { color: var(--paper); text-shadow: 0 1px 6px rgba(0,0,0,0.55); max-width: 560px !important; }
.hero--photo .btn--outline { color: var(--paper); border-color: var(--paper); }
.hero--photo .btn--outline:hover { background: var(--paper); color: var(--ink); }

/* ---------- Rangée de logos (À propos) ---------- */
.logos-row {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 28px;
  width: fit-content;
  backdrop-filter: blur(4px);
}
.logos-row img { height: 68px; width: auto; }
.logos-row span.sep { color: var(--bordeaux); font-size: 1.8rem; font-weight: 300; }

/* ---------- Illustration photo dans une carte (piliers / tuiles / parcours) ---------- */
.pillar-photo, .ac-card__photo, .tile-photo {
  display: block;
  width: 100%;
  object-fit: cover;
}
.pillar-photo {
  height: 150px;
  border-radius: 10px;
  margin-bottom: 18px;
}

/* ---------- Callout (encart texte sous mosaïque) ---------- */
.callout {
  border-left: 3px solid var(--bordeaux);
  padding: 4px 0 4px 24px;
  max-width: 820px;
}
html[dir="rtl"] .callout { border-left: none; border-right: 3px solid var(--bordeaux); padding: 4px 24px 4px 0; }
.callout h3 { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--sand-deep);
  padding: 56px 0 32px;
  font-size: 0.9rem;
}
.site-footer a { color: var(--sand-deep); text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(243, 238, 228, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Banner (placeholder EN/AR) ---------- */
.lang-pending-banner {
  background: var(--gold-soft);
  color: var(--paper);
  text-align: center;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 600px) {
  .form-row--split { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Hero accueil : disposition claire, deux colonnes (pas de fond sombre) ---------- */
.hero--split {
  position: relative;
  padding: 88px 0 72px;
  background: var(--paper);
  overflow: hidden;
}
.hero--split .hero-mesh { opacity: 0.22; }
.hero--split .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero--split .hero__kicker { color: var(--bordeaux); }
.hero--split h1, .hero--split h2 { color: var(--ink); }
.hero--split .lead { color: var(--ink-soft); }
.hero--split__media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(19, 39, 63, 0.18);
  transform: rotate(1.2deg);
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.hero--split__media:hover { transform: rotate(0deg) scale(1.015); }
.hero--split__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
@media (max-width: 900px) {
  .hero--split .container { grid-template-columns: 1fr; }
  .hero--split__media { order: -1; max-width: 420px; margin: 0 auto 8px; }
}
html[dir="rtl"] .hero--split__media { transform: rotate(-1.2deg); }
html[dir="rtl"] .hero--split__media:hover { transform: rotate(0deg) scale(1.015); }

/* =========================================================
   Animations supplémentaires (vie du site)
   ========================================================= */

/* 1. Parallax léger sur les bannières photo au mouvement de la souris — piloté en JS */

/* 2. Effet "shine" au survol des boutons pleins */
.btn--primary, .btn--gold, .btn--outline { position: relative; overflow: hidden; }
.btn--primary::before, .btn--gold::before, .btn--outline::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn--primary:hover::before, .btn--gold:hover::before, .btn--outline:hover::before { left: 130%; }

/* 3. Entrée animée du logo au chargement de la page */
@keyframes logo-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.site-header .logo { animation: logo-in 0.6s cubic-bezier(.22,.61,.36,1) both; }

/* 4. Zoom doux au survol des photos (piliers, tuiles, cartes parcours) */
.card--pillar { overflow: hidden; border-radius: var(--radius); }
.pillar-photo { transition: transform 0.6s cubic-bezier(.22,.61,.36,1); }
.card--pillar:hover .pillar-photo { transform: scale(1.06); }

/* 5. Flottement discret des icônes de la mosaïque "Ce que nous construisons" */
@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.showcase__tile svg { animation: icon-float 4.5s ease-in-out infinite; }
.showcase__tile:nth-child(odd) svg { animation-delay: -1.5s; }
@media (prefers-reduced-motion: reduce) { .showcase__tile svg { animation: none; } }

/* 6. Soulignement animé des kickers au scroll */
.reveal .hero__kicker { position: relative; display: inline-block; }
.reveal .hero__kicker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(.22,.61,.36,1) 0.25s;
}
.reveal.is-visible .hero__kicker::after { transform: scaleX(1); }
html[dir="rtl"] .reveal .hero__kicker::after { transform-origin: right; }

@media (prefers-reduced-motion: reduce) {
  .site-header .logo { animation: none; }
  .hero--split__media { transition: none; }
}

/* =========================================================
   RTL (arabe)
   ========================================================= */
html[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .logo { font-family: 'El Messiri', 'IBM Plex Sans Arabic', sans-serif; letter-spacing: 0; }
html[dir="rtl"] .hero { text-align: right; }
html[dir="rtl"] .card--pillar .pillar-num { right: auto; left: 28px; }
html[dir="rtl"] .checkbox-row input { margin-top: 4px; }
html[dir="rtl"] .format-card ul { padding-left: 0; padding-right: 20px; }
