/* =============================================================
   FONDATION XXVII — Couche Prestige
   Inspiré : Cartier · Pernod Ricard · Taylor · ARP
   Inédit : compteur vivant, œuvre du moment, timeline, ticker
   ============================================================= */

/* ── Ticker de bienvenue en haut de page ─────────────────── */
.xxvii-ticker {
  width: 100%;
  background: var(--c-text, #1C1815);
  color: rgba(247,242,235,.75);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}
.xxvii-ticker-inner {
  display: flex;
  gap: 0;
  animation: ticker-scroll 28s linear infinite;
  white-space: nowrap;
}
.xxvii-ticker-inner span {
  padding: 0 48px;
  border-right: 1px solid rgba(247,242,235,.12);
}
.xxvii-ticker-inner span em {
  font-style: normal;
  color: #B8643C;
  margin-right: 8px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Compteur vivant ─────────────────────────────────────── */
.xxvii-counter-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--c-line, rgba(28,24,21,.10));
}
.xxvii-counter-item {
  padding: clamp(28px,4vw,56px) clamp(20px,3vw,40px);
  border-right: 1px solid var(--c-line, rgba(28,24,21,.10));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xxvii-counter-item:last-child { border-right: none; }
.xxvii-counter-num {
  font-family: 'Cinzel', serif;
  font-size: clamp(38px, 5.5vw, 80px);
  line-height: 1;
  color: var(--c-text, #1C1815);
  letter-spacing: -.02em;
  font-weight: 700;
}
.xxvii-counter-num .suffix { font-size: .52em; color: #B8643C; margin-left: 3px; }
.xxvii-counter-label {
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(28,24,21,.45);
  font-weight: 600;
}
@media (max-width: 760px) {
  .xxvii-counter-band { grid-template-columns: repeat(2,1fr); }
  .xxvii-counter-item:nth-child(2) { border-right: none; }
}
@media (max-width: 460px) {
  .xxvii-counter-band { grid-template-columns: 1fr; }
  .xxvii-counter-item { border-right: none; border-bottom: 1px solid var(--c-line); }
}

/* ── Œuvre du moment — bloc immersif ────────────────────── */
.xxvii-oeuvre {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  border-bottom: 1px solid var(--c-line);
}
.xxvii-oeuvre-img {
  position: relative;
  overflow: hidden;
  background: #1C1815;
}
.xxvii-oeuvre-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.88);
  transition: transform 8s ease, filter 8s ease;
}
.xxvii-oeuvre:hover .xxvii-oeuvre-img img {
  transform: scale(1.04);
  filter: saturate(1.05);
}
.xxvii-oeuvre-badge {
  position: absolute;
  top: 28px; left: 28px;
  background: #B8643C;
  color: #fff;
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 7px 14px;
}
.xxvii-oeuvre-text {
  padding: clamp(40px,5vw,80px) clamp(28px,4vw,64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--c-line);
  background: #fff;
}
.xxvii-oeuvre-eyebrow {
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #B8643C;
  margin-bottom: 20px;
  font-weight: 700;
}
.xxvii-oeuvre-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 3.2vw, 48px);
  line-height: 1.08;
  color: #1C1815;
  margin: 0 0 24px;
  letter-spacing: .01em;
}
.xxvii-oeuvre-caption {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(28,24,21,.58);
  max-width: 42ch;
  margin-bottom: 36px;
}
.xxvii-oeuvre-meta {
  display: flex;
  gap: 32px;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(28,24,21,.38);
  padding-top: 32px;
  border-top: 1px solid var(--c-line);
}
.xxvii-oeuvre-meta strong { display: block; color: #1C1815; font-size: 12px; letter-spacing: .02em; text-transform: none; margin-top: 5px; }
@media (max-width: 840px) {
  .xxvii-oeuvre { grid-template-columns: 1fr; }
  .xxvii-oeuvre-img { min-height: 300px; }
  .xxvii-oeuvre-text { border-left: none; border-top: 1px solid var(--c-line); }
}

/* ── Timeline verticale ──────────────────────────────────── */
.xxvii-timeline {
  padding: clamp(48px,6vw,96px) clamp(24px,4vw,72px);
  border-bottom: 1px solid var(--c-line);
}
.xxvii-timeline-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 3.5vw, 52px);
  letter-spacing: .03em;
  color: #1C1815;
  margin: 0 0 64px;
}
.xxvii-timeline-list {
  position: relative;
  padding-left: 48px;
  list-style: none;
  margin: 0;
  border-left: 1px solid var(--c-line);
}
.xxvii-tl-item {
  position: relative;
  padding: 0 0 52px 40px;
}
.xxvii-tl-item::before {
  content: "";
  position: absolute;
  left: -5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #B8643C;
  transition: transform .3s ease;
}
.xxvii-tl-item:hover::before { transform: scale(1.8); }
.xxvii-tl-year {
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #B8643C;
  font-weight: 700;
  margin-bottom: 8px;
}
.xxvii-tl-event {
  font-family: 'Cinzel', serif;
  font-size: clamp(16px, 2vw, 24px);
  color: #1C1815;
  margin: 0 0 8px;
}
.xxvii-tl-desc {
  font-size: 13px;
  color: rgba(28,24,21,.52);
  line-height: 1.75;
  max-width: 52ch;
}

/* ── Section Mécénat/Don ─────────────────────────────────── */
.xxvii-mecenat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--c-line);
}
.xxvii-mecenat-text {
  padding: clamp(48px,6vw,96px) clamp(28px,4vw,64px);
  background: #1C1815;
  color: rgba(247,242,235,.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.xxvii-mecenat-eyebrow {
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #B8643C;
  font-weight: 700;
  margin-bottom: 24px;
}
.xxvii-mecenat-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 3.5vw, 52px);
  line-height: 1.08;
  color: #F7F2EB;
  margin: 0 0 24px;
}
.xxvii-mecenat-text p {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(247,242,235,.6);
  max-width: 44ch;
  margin: 0 0 40px;
}
.xxvii-mecenat-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.xxvii-mecenat-actions .btn {
  background: #B8643C !important;
  border-color: #B8643C !important;
  color: #fff !important;
}
.xxvii-mecenat-actions .btn.alt {
  background: transparent !important;
  border-color: rgba(247,242,235,.3) !important;
  color: rgba(247,242,235,.85) !important;
}
.xxvii-mecenat-actions .btn.alt:hover {
  border-color: #B8643C !important;
  color: #B8643C !important;
}
.xxvii-mecenat-avantages {
  padding: clamp(48px,6vw,96px) clamp(28px,4vw,64px);
  background: #F7F2EB;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.xxvii-avantage {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
}
.xxvii-avantage-num {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  color: rgba(28,24,21,.15);
  line-height: 1;
  font-weight: 700;
}
.xxvii-avantage-content strong {
  display: block;
  font-size: 13px;
  letter-spacing: .04em;
  color: #1C1815;
  margin-bottom: 5px;
  font-weight: 700;
}
.xxvii-avantage-content p {
  font-size: 12px;
  color: rgba(28,24,21,.52);
  line-height: 1.65;
  margin: 0;
}
@media (max-width: 840px) {
  .xxvii-mecenat { grid-template-columns: 1fr; }
}

/* ── Bloc citation grand format ─────────────────────────── */
.xxvii-grand-quote {
  padding: clamp(64px,8vw,120px) clamp(24px,6vw,120px);
  border-bottom: 1px solid var(--c-line);
  background: #fff;
  text-align: center;
}
.xxvii-grand-quote blockquote {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 3.8vw, 60px);
  line-height: 1.18;
  color: #1C1815;
  margin: 0 auto 32px;
  max-width: 22ch;
  letter-spacing: .01em;
  font-weight: 700;
}
.xxvii-grand-quote cite {
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #B8643C;
  font-style: normal;
  font-weight: 700;
}

/* ── Animation entrée au scroll ─────────────────────────── */
.xxvii-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}
.xxvii-reveal.xxvii-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ── Bloc fondateurs ─────────────────────────────────────── */
.xxvii-founders {
  padding: clamp(64px,7vw,112px) clamp(24px,4vw,72px);
  border-bottom: 1px solid var(--c-line, rgba(28,24,21,.10));
  background: #fff;
}
.xxvii-founders-eyebrow {
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #B8643C;
  font-weight: 700;
  margin-bottom: 16px;
}
.xxvii-founders-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 3.8vw, 56px);
  color: #1C1815;
  margin: 0 0 20px;
  line-height: 1.06;
  letter-spacing: .02em;
}
.xxvii-founders-lead {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(28,24,21,.55);
  max-width: 66ch;
  margin: 0 0 56px;
}
.xxvii-founders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(28,24,21,.08);
  margin-bottom: 48px;
}
.xxvii-founder-card {
  background: #F7F2EB;
  padding: clamp(24px,3vw,40px) clamp(20px,2.5vw,32px);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background .3s ease;
}
.xxvii-founder-card:hover { background: #fff; }
.xxvii-founder-card--wide {
  grid-column: span 4;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}
.xxvii-founder-initial {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: rgba(28,24,21,.12);
  line-height: 1;
  flex: none;
}
.xxvii-founder-info { display: flex; flex-direction: column; gap: 6px; }
.xxvii-founder-role {
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #B8643C;
  font-weight: 700;
}
.xxvii-founder-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(14px, 1.6vw, 20px);
  color: #1C1815;
  font-weight: 700;
  letter-spacing: .02em;
}
.xxvii-founder-territory {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(28,24,21,.38);
  margin-bottom: 8px;
}
.xxvii-founder-info p {
  font-size: 12px;
  line-height: 1.72;
  color: rgba(28,24,21,.52);
  margin: 0;
  max-width: 38ch;
}
.xxvii-founders-cta { text-align: center; }

@media (max-width: 900px) {
  .xxvii-founders-grid { grid-template-columns: repeat(2, 1fr); }
  .xxvii-founder-card--wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .xxvii-founders-grid { grid-template-columns: 1fr; }
  .xxvii-founder-card--wide { grid-column: span 1; flex-direction: column; }
}

/* ── Moment de chaleur humaine (hero image plein écran) ── */
.xxvii-human-moment {
  position: relative;
  height: clamp(420px, 55vw, 680px);
  overflow: hidden;
  border-bottom: 1px solid var(--c-line);
}
.xxvii-human-moment img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  filter: saturate(.92);
  transform: scale(1.03);
  transition: transform 10s ease;
}
.xxvii-human-moment:hover img { transform: scale(1); }
.xxvii-human-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(28,24,21,.72) 0%,
    rgba(28,24,21,.18) 55%,
    transparent 100%
  );
  display: flex; align-items: flex-end;
  padding: clamp(32px,4vw,64px) clamp(24px,4vw,72px);
}
.xxvii-human-text {
  max-width: 48ch;
  color: #F7F2EB;
}
.xxvii-human-text .xxvii-founders-eyebrow { color: #C8754A; margin-bottom: 14px; }
.xxvii-human-caption {
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 2.8vw, 38px);
  line-height: 1.18;
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: .01em;
}
.xxvii-human-sub {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(247,242,235,.65);
  margin: 0;
}

/* ── Manifeste animé (texte qui s'écrit) ─────────────────── */
.xxvii-manifeste-anim {
  padding: clamp(64px,8vw,120px) clamp(24px,6vw,120px);
  background: #1C1815;
  border-bottom: 1px solid rgba(247,242,235,.06);
  text-align: center;
}
.xxvii-manifeste-words {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 3.5vw, 54px);
  line-height: 1.38;
  color: #F7F2EB;
  max-width: 22ch;
  margin: 0 auto 40px;
  font-weight: 700;
  letter-spacing: .015em;
}
.xxvii-manifeste-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
  margin-right: .28em;
}
.xxvii-manifeste-words .word.visible {
  opacity: 1;
  transform: translateY(0);
}
.xxvii-manifeste-words .word.gold { color: #B8643C; }
.xxvii-manifeste-sub {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(247,242,235,.35);
  font-weight: 600;
}

/* ── Appel intime final ───────────────────────────────────── */
.xxvii-appel {
  padding: clamp(80px,9vw,140px) clamp(24px,6vw,120px);
  text-align: center;
  border-top: 1px solid var(--c-line);
  background: #F7F2EB;
}
.xxvii-appel-question {
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 2.8vw, 40px);
  color: #1C1815;
  max-width: 28ch;
  margin: 0 auto 20px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .01em;
}
.xxvii-appel-sub {
  font-size: 14px;
  color: rgba(28,24,21,.52);
  line-height: 1.8;
  max-width: 46ch;
  margin: 0 auto 40px;
}
.xxvii-appel-actions {
  display: flex; gap: 16px;
  justify-content: center; flex-wrap: wrap;
}
.xxvii-appel-sig {
  margin-top: 56px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(28,24,21,.28);
}

@media (max-width: 640px) {
  .xxvii-human-overlay { padding: 24px 20px; }
  .xxvii-manifeste-anim { padding: 56px 20px; }
  .xxvii-appel { padding: 64px 20px; }
}

/* ================================================================
   CORRECTIONS & 15 AMÉLIORATIONS
   ================================================================ */

/* FIX 1 — Titre mécénat visible sur fond sombre (contre upgrade.css) */
.xxvii-mecenat-title,
.xxvii-mecenat-text h2,
.xxvii-mecenat-text h1,
.xxvii-mecenat-text h3 {
  color: #F7F2EB !important;
}
.xxvii-mecenat-text p,
.xxvii-mecenat-eyebrow { color: rgba(247,242,235,.75) !important; }
.xxvii-mecenat-eyebrow { color: #C8754A !important; }

/* FIX 2 — Manifeste animé : forcer les mots invisibles au départ */
.xxvii-manifeste-words .word {
  opacity: 0 !important;
  transform: translateY(14px) !important;
  transition: opacity .5s ease, transform .5s ease !important;
  will-change: opacity, transform;
}
.xxvii-manifeste-words .word.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* FIX 3 — Image logo pixelisée : rendu net */
.hero-card-logo,
.hero-logo-card img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

/* AMÉLIORATION 1 — Curseur personnalisé sur les zones artistiques */
.xxvii-human-moment,
.xxvii-oeuvre-img { cursor: crosshair; }

/* AMÉLIORATION 2 — Ligne de séparation animée entre sections */
.xxvii-divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #B8643C 40%, #B8643C 60%, transparent);
  margin: 0;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity .8s ease, transform 1.1s cubic-bezier(.22,.61,.36,1);
}
.xxvii-divider-line.xxvii-visible {
  opacity: 1;
  transform: scaleX(1);
}

/* AMÉLIORATION 3 — Navigation : page active surlignée */
.nav a[aria-current="page"],
.nav a.active {
  color: var(--c-text, #1C1815) !important;
}
.nav a[aria-current="page"]::after,
.nav a.active::after {
  right: 14px !important;
  background: #B8643C !important;
}

/* AMÉLIORATION 4 — Fondateur card : numéro de territoire animé */
.xxvii-founder-territory {
  position: relative;
  padding-left: 14px;
}
.xxvii-founder-territory::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #B8643C;
}

/* AMÉLIORATION 5 — Appel intime : trait doré décoratif */
.xxvii-appel::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #B8643C;
  margin: 0 auto 48px;
}

/* AMÉLIORATION 6 — Ticker : pause au hover */
.xxvii-ticker:hover .xxvii-ticker-inner {
  animation-play-state: paused;
}

/* AMÉLIORATION 7 — Cartes fondateurs : bordure gauche colorée au hover */
.xxvii-founder-card {
  border-left: 2px solid transparent;
  transition: background .3s ease, border-color .3s ease !important;
}
.xxvii-founder-card:hover {
  border-left-color: #B8643C !important;
}

/* AMÉLIORATION 8 — Image chaleur humaine : léger vignettage vertical */
.xxvii-human-moment::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(28,24,21,.35), transparent);
  pointer-events: none;
}

/* AMÉLIORATION 9 — Section manifeste : particules lumineuses flottantes */
.xxvii-manifeste-anim {
  position: relative;
  overflow: hidden;
}
.xxvii-manifeste-anim::before {
  content: "· · · · · · · · · · · ·";
  position: absolute;
  top: 18px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .5em;
  color: rgba(184,100,60,.18);
  pointer-events: none;
}
.xxvii-manifeste-anim::after {
  content: "· · · · · · · · · · · ·";
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .5em;
  color: rgba(184,100,60,.18);
  pointer-events: none;
}

/* AMÉLIORATION 10 — Avantages mécénat : ligne de connexion entre num et texte */
.xxvii-avantage {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(28,24,21,.07);
}
.xxvii-avantage:last-child { border-bottom: none; padding-bottom: 0; }

/* AMÉLIORATION 11 — Photo humaine : caption slide-up au hover */
.xxvii-human-text {
  transform: translateY(12px);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.xxvii-human-moment:hover .xxvii-human-text {
  transform: translateY(0);
}

/* AMÉLIORATION 12 — Appel intime : question en deux tons */
.xxvii-appel-question em {
  font-style: normal;
  color: #B8643C;
}

/* AMÉLIORATION 13 — Bloc fondateurs : grande lettre décorative en arrière-plan */
.xxvii-founders {
  position: relative;
  overflow: hidden;
}
.xxvii-founders::before {
  content: "XXVII";
  position: absolute;
  right: -20px; bottom: -40px;
  font-family: 'Cinzel', serif;
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 800;
  color: rgba(28,24,21,.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: .04em;
}

/* AMÉLIORATION 14 — Stats hero : animation d'entrée décalée */
.stat:nth-child(1) { transition-delay: .0s; }
.stat:nth-child(2) { transition-delay: .08s; }
.stat:nth-child(3) { transition-delay: .16s; }
.stat:nth-child(4) { transition-delay: .24s; }

/* AMÉLIORATION 15 — Footer minimaliste propre en bas de chaque page */
body > .page::after {
  content: "Fondation XXVII · Geste · Regard · Transmission · contact@fondationxxvii.org";
  display: block;
  text-align: center;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(28,24,21,.28);
  padding: 32px 24px;
  border-top: 1px solid rgba(28,24,21,.07);
  margin-top: 48px;
}
