/* =========================================================
   CNR 2027 — Patriotique chaleureux / "lever du jour"
   ========================================================= */

:root {
  /* Encre & papier */
  --ink:        #1d1b16;
  --ink-soft:   #4a443a;
  --cream:      #fbf4e6;
  --cream-2:    #f3e7cf;
  --paper:      #fffaf0;

  /* Tricolore réchauffé */
  --bleu:       #163a78;
  --bleu-deep:  #0d2350;
  --bleu-night: #091a3d;
  --rouge:      #c5283d;
  --rouge-deep: #9c1c2e;
  --gold:       #cda349;
  --gold-soft:  #e6c878;
  --amber:      #e8893a;
  --rose:       #e8a07a;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.02rem, 0.6vw + 0.92rem, 1.18rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--gold-soft); color: var(--ink); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---------- Reading progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--bleu), var(--paper) 50%, var(--rouge));
  box-shadow: 0 0 12px rgba(205,163,73,.6);
  transition: width .1s linear;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled {
  background: rgba(251, 244, 230, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 1px 0 rgba(29,27,22,.08), 0 10px 30px -22px rgba(13,35,80,.5);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; gap: 3px; }
.brand-mark i { width: 5px; height: 22px; border-radius: 2px; display: block; transform: skewX(-10deg); }
.brand-mark i:nth-child(1) { background: var(--bleu); }
.brand-mark i:nth-child(2) { background: var(--paper); box-shadow: inset 0 0 0 1px rgba(29,27,22,.15); }
.brand-mark i:nth-child(3) { background: var(--rouge); }
.nav.scrolled .brand-mark i:nth-child(2),
.nav:not(.scrolled) .brand-mark i:nth-child(2) { background: #fff; }
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.32rem;
  letter-spacing: .02em; color: var(--ink);
}
.nav:not(.scrolled) .brand-text,
.nav:not(.scrolled) .brand-text .brand-year { color: var(--paper); }
.brand-year { color: var(--rouge); margin-left: 2px; }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav-links a {
  font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  color: var(--paper); opacity: .9; position: relative; padding: 4px 0;
  transition: opacity .25s var(--ease), color .25s var(--ease);
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--gold-soft); transition: width .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav.scrolled .nav-links a { color: var(--ink-soft); }
.nav.scrolled .nav-links a:hover { color: var(--ink); }
.nav-links a:hover { opacity: 1; }

.nav-cta {
  background: var(--rouge); color: #fff !important; opacity: 1 !important;
  padding: 9px 20px !important; border-radius: 999px;
  box-shadow: 0 8px 22px -10px rgba(197,40,61,.9);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); background: var(--rouge-deep); box-shadow: 0 12px 26px -10px rgba(156,28,46,.95); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .01em; padding: 15px 32px; border-radius: 999px;
  cursor: pointer; border: none; position: relative; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--rouge) 0%, var(--amber) 120%);
  box-shadow: 0 14px 34px -14px rgba(197,40,61,.9), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(120deg, var(--amber), var(--rouge));
  opacity: 0; transition: opacity .3s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -14px rgba(197,40,61,.95); }
.btn-primary:hover::before { opacity: 1; }
.btn-ghost {
  color: var(--paper); background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255,250,240,.4);
}
.btn-ghost:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px rgba(255,250,240,.95); background: rgba(255,250,240,.06); }

/* ---------- Shared grain & sky ---------- */
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 140px clamp(20px, 5vw, 60px) 90px; overflow: hidden; color: var(--paper);
}
.hero-sky { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 90% at 50% 118%, var(--gold-soft) 0%, var(--amber) 16%, var(--rouge) 38%, var(--bleu) 72%, var(--bleu-night) 100%);
}
.sun {
  position: absolute; left: 50%; bottom: -14%; transform: translateX(-50%);
  width: min(80vw, 720px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,247,222,.95) 0%, rgba(246,200,120,.7) 30%, rgba(232,137,58,.25) 55%, transparent 70%);
  filter: blur(4px); animation: sun-rise 1.6s var(--ease) both;
}
.sun.small { width: min(70vw, 520px); bottom: -22%; opacity: .85; }
@keyframes sun-rise { from { transform: translateX(-50%) translateY(60px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.rays {
  position: absolute; inset: 0; opacity: .35; mix-blend-mode: soft-light;
  background: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255,247,222,.5) 0deg 3deg, transparent 3deg 11deg);
  animation: rays-spin 90s linear infinite;
}
@keyframes rays-spin { to { transform: rotate(360deg); } }

.hero-inner { position: relative; z-index: 2; max-width: 980px; }

/* Silhouette mystère du futur candidat ou de la future candidate */
.candidate { margin: 0 auto 30px; width: 150px; }
.candidate-frame {
  position: relative; width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 36%, rgba(255,243,214,.95), rgba(246,200,120,.55) 42%, rgba(20,30,60,.35) 74%, rgba(9,26,61,.5) 100%);
  box-shadow:
    0 0 0 1.5px rgba(230,200,120,.55),
    0 0 0 7px rgba(255,250,240,.06),
    0 18px 44px -18px rgba(9,26,61,.85),
    inset 0 -10px 26px rgba(9,26,61,.4);
}
.candidate-glow {
  position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255,236,190,.5), transparent 60%);
  animation: candidate-pulse 4.5s ease-in-out infinite;
}
@keyframes candidate-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.sil {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  fill: #11203f; opacity: 0;
  animation: sil-cycle 17s ease-in-out infinite;
}
.sil:nth-child(2) { animation-delay: 0s; }
.sil:nth-child(3) { animation-delay: 4.25s; }
.sil:nth-child(4) { animation-delay: 8.5s; }
.sil:nth-child(5) { animation-delay: 12.75s; }
@keyframes sil-cycle {
  0%   { opacity: 0; transform: scale(1.05); }
  4%   { opacity: 1; transform: scale(1); }
  21%  { opacity: 1; transform: scale(1); }
  25%  { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.05); }
}

.eyebrow {
  font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: .42em; font-size: .8rem; color: var(--gold-soft);
  margin: 0 0 26px; text-indent: .42em;
}
.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 11vw, 8.2rem); line-height: 1; letter-spacing: -.02em;
  margin: 0; text-shadow: 0 24px 60px rgba(9,26,61,.5);
}
.hero-title span { display: block; }
.hero-title .accent {
  font-weight: 700; line-height: 1.16;
  background: linear-gradient(100deg, var(--gold-soft), #fff 40%, var(--gold-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: .04em .12em .22em; overflow: visible;
}
.hero-lede {
  max-width: 680px; margin: 32px auto 0; font-size: clamp(1.1rem, 1.4vw, 1.4rem);
  line-height: 1.6; color: rgba(255,250,240,.92); font-weight: 300;
}
.hero-cta { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-tricolore { margin: 46px auto 0; display: flex; gap: 0; width: 168px; height: 5px; border-radius: 3px; overflow: hidden; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.hero-tricolore span { flex: 1; }
.hero-tricolore span:nth-child(1) { background: var(--bleu); }
.hero-tricolore span:nth-child(2) { background: #fff; }
.hero-tricolore span:nth-child(3) { background: var(--rouge); }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  color: rgba(255,250,240,.7); animation: bob 2.4s ease-in-out infinite;
}
.scroll-hint svg { opacity: .8; }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- Sections génériques ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 160px) clamp(20px, 6vw, 80px); }
.section-head { max-width: var(--maxw); margin: 0 auto clamp(40px, 5vw, 70px); }
.section-head.center { text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .26em; font-size: .76rem;
  color: var(--rouge); margin-bottom: 22px;
}
.kicker em { font-style: normal; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: 0; color: var(--gold); }
.kicker.light { color: var(--gold-soft); }
.kicker.light em { color: var(--rose); }
.section-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.04; margin: 0; max-width: 16ch;
}
.section-head.center .section-title { max-width: 22ch; margin-inline: auto; }
.section-title.light { color: var(--paper); }
.section-sub { max-width: 60ch; margin: 26px auto 0; color: rgba(255,250,240,.82); font-weight: 300; font-size: 1.12rem; }

.prose { max-width: 720px; margin: 0 auto; }
.prose-wide { max-width: 820px; }
.prose p { margin: 0 0 1.5em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .demarche-claim strong { color: var(--ink); font-weight: 600; }

.lead {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 2.05rem); line-height: 1.34;
  color: var(--ink) !important; margin-bottom: 1.1em !important;
}
.lead strong { font-weight: 600; color: var(--rouge-deep); }

/* ---------- Constat ---------- */
.section-constat { background:
  linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%); }

.pull {
  max-width: 900px; margin: clamp(48px,6vw,76px) auto; padding: 0 clamp(20px, 5vw, 60px);
  text-align: center; border: none;
}
.pull p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem); line-height: 1.25; color: var(--bleu-deep);
  margin: 0; position: relative;
}
.pull p::before, .pull p::after { content: ""; display: block; width: 64px; height: 3px; margin: 0 auto; border-radius: 2px; }
.pull p::before { background: linear-gradient(90deg, var(--bleu), var(--rouge)); margin-bottom: 28px; }
.pull p::after { background: linear-gradient(90deg, var(--rouge), var(--gold)); margin-top: 28px; }

/* ---------- Vision (dark) ---------- */
.section-vision {
  background:
    radial-gradient(120% 100% at 80% -10%, rgba(232,137,58,.22), transparent 50%),
    radial-gradient(100% 80% at 0% 110%, rgba(197,40,61,.28), transparent 55%),
    linear-gradient(160deg, var(--bleu-deep), var(--bleu-night));
  color: var(--paper);
}
.litany { max-width: 960px; margin: 0 auto; }
.litany-line {
  position: relative; margin: 0; padding: 22px 0 22px 30px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 2.3rem); line-height: 1.22; color: var(--paper);
  border-bottom: 1px solid rgba(255,250,240,.12);
}
.litany-line:last-child { border-bottom: none; }
.litany-line::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 0; border-radius: 3px;
  background: linear-gradient(var(--gold-soft), var(--amber));
  transition: height .6s var(--ease);
}
.litany-line.in::before { height: calc(100% - 28px); }
.litany-line:nth-child(2) { transition-delay: .06s; }
.litany-line:nth-child(3) { transition-delay: .12s; }
.litany-line:nth-child(4) { transition-delay: .18s; }
.litany-line:nth-child(5) { transition-delay: .24s; }

/* ---------- Démarche ---------- */
.section-demarche { background: var(--paper); text-align: center; }
.section-demarche .section-head { text-align: center; }
.section-demarche .section-title { max-width: 22ch; margin-inline: auto; }
.section-demarche .prose { text-align: left; }
.demarche-claim {
  max-width: var(--maxw); margin: clamp(44px,5vw,64px) auto 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem); line-height: 1.2; color: var(--rouge-deep);
}

/* ---------- Soutenir (dark warm) ---------- */
.section-soutenir { position: relative; color: var(--paper); overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 130%, var(--amber) 0%, var(--rouge) 24%, var(--bleu) 64%, var(--bleu-night) 100%);
}
.soutenir-sky { position: absolute; inset: 0; z-index: 0; }
.section-soutenir > * { position: relative; z-index: 1; }

.orgs {
  max-width: 940px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.org-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 30px 28px; border-radius: 18px; min-height: 200px;
  background: linear-gradient(160deg, rgba(255,250,240,.97), rgba(243,231,207,.92));
  color: var(--ink); box-shadow: 0 24px 50px -28px rgba(9,26,61,.8);
  transform: translateY(0); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.org-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--bleu), #fff 50%, var(--rouge));
}
.org-card:hover { transform: translateY(-8px); box-shadow: 0 36px 60px -28px rgba(9,26,61,.9); }
.org-tag {
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  color: var(--rouge);
}
.org-card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1;
  margin: 0; color: var(--bleu-deep);
}
.org-logo {
  width: auto; max-width: 86%; max-height: 58px; height: auto; object-fit: contain;
  object-position: left center; margin: 4px 0 8px;
}
.org-card p { margin: 0; font-size: .98rem; color: var(--ink-soft); flex: 1; }
.org-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--rouge-deep);
  font-size: 1.02rem; margin-top: auto;
}
.org-link svg { transition: transform .3s var(--ease); }
.org-card:hover .org-link svg { transform: translateX(4px); }
.org-card.placeholder { border: 1.5px dashed rgba(13,35,80,.35); background: rgba(255,250,240,.86); }
.org-card.placeholder .org-tag { color: var(--bleu); }

.fiscal {
  max-width: var(--maxw); margin: clamp(40px,5vw,64px) auto 0;
  display: flex; gap: 22px; align-items: flex-start;
  padding: 30px clamp(24px, 3vw, 40px); border-radius: 18px;
  background: rgba(255,250,240,.08); border: 1px solid rgba(255,250,240,.2);
  backdrop-filter: blur(4px);
}
.fiscal-icon {
  flex: none; width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem; color: var(--bleu-deep);
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 10px 24px -12px rgba(205,163,73,.9);
}
.fiscal-body p { margin: 0 0 8px; color: rgba(255,250,240,.9); font-weight: 300; font-size: 1.02rem; }
.fiscal-body p:last-child { margin-bottom: 0; }
.fiscal-note { font-size: .92rem !important; color: rgba(255,250,240,.7) !important; }

/* ---------- Finale ---------- */
.section-finale {
  position: relative; overflow: hidden; text-align: center; color: var(--paper);
  background:
    radial-gradient(120% 100% at 50% 120%, var(--gold-soft) 0%, var(--amber) 18%, var(--rouge) 40%, var(--bleu-deep) 78%, var(--bleu-night) 100%);
  padding-block: clamp(96px, 12vw, 180px);
}
.finale-sky { position: absolute; inset: 0; z-index: 0; }
.finale-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.finale-lede { max-width: 640px; margin: 0 auto 34px; font-weight: 300; font-size: 1.16rem; color: rgba(255,250,240,.9); }
.finale-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.06; margin: 0 0 42px;
  text-shadow: 0 20px 50px rgba(9,26,61,.5);
}
.finale-tricolore { margin: 46px auto 0; display: flex; width: 200px; height: 5px; border-radius: 3px; overflow: hidden; }
.finale-tricolore span { flex: 1; }
.finale-tricolore span:nth-child(1) { background: var(--bleu); }
.finale-tricolore span:nth-child(2) { background: #fff; }
.finale-tricolore span:nth-child(3) { background: var(--rouge); }

/* ---------- Footer ---------- */
.footer { background: var(--bleu-night); color: rgba(255,250,240,.72); padding: 56px clamp(20px, 6vw, 80px); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff; }
.footer-brand span { color: var(--rouge); }
.footer-note { max-width: 60ch; margin: 16px auto 8px; font-weight: 300; font-size: .98rem; }
.footer-legal { font-size: .82rem; letter-spacing: .04em; opacity: .6; margin: 12px 0 0; }

/* ---------- Reveal animations ---------- */
.reveal, .reveal-up { will-change: transform, opacity; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .26s; }
.reveal[data-delay="4"] { transition-delay: .40s; }
.reveal[data-delay="5"] { transition-delay: .54s; }
.reveal[data-delay="6"] { transition-delay: .66s; }

.reveal-up { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .crises { grid-template-columns: repeat(2, 1fr); }
  .vision-grid { grid-template-columns: 1fr; }
  .fiscal { flex-direction: column; gap: 16px; }
}
@media (max-width: 520px) {
  .crises { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal, .reveal-up { opacity: 1; transform: none; }
  .sil { opacity: 0; }
  .sil:nth-child(2) { opacity: 1; }
  html { scroll-behavior: auto; }
}
