/* Cénacle des Lys — Feuille de style principale */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  --bg-deep:    #0E0F0F;
  --bg-mid:     #141616;
  --bg-surface: #1A1D1D;
  --bg-card:    #1E2222;

  --patine-deep:  #1C3A38;
  --patine-mid:   #2E5C57;
  --patine:       #4A8B82;
  --patine-light: #6AADA3;
  --patine-pale:  #8DCAC0;

  --bronze-dark:  #3A2E20;
  --bronze-mid:   #5C4830;
  --bronze:       #7A6040;
  --bronze-warm:  #8C7050;

  /* Or exclusif aux fleurs de lys */
  --or:       #C8A84B;
  --or-deep:  #8B6914;
  --or-pale:  #E8D5A3;

  --text-light: #D4D8D7;
  --text-mid:   #8A9490;
  --text-dim:   #4A5250;
  --text-muted: #2E3533;

  --border:        #252A29;
  --border-patine: #2E5C57;
  --border-mid:    #2A3230;

  --font-elegante: 'Cormorant Garamond', 'IM Fell English', 'Garamond', 'Times New Roman', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg-deep);
  color: var(--text-light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: rgba(14,15,15,0.97);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3.5rem;
  backdrop-filter: blur(4px);
}
/* Ornement sous la nav */
.site-nav::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--patine-deep), transparent);
  pointer-events: none;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-elegante);
  font-size: 21px; font-weight: 300; letter-spacing: 5px;
  color: var(--text-light);
  text-decoration: none;
  text-transform: uppercase;
}
.nav-logo .lys { color: var(--or); font-size: 30px; line-height: 1; }
.nav-links {
  display: flex; align-items: center; gap: 2.5rem;
}
.nav-links a {
  font-family: var(--font-elegante);
  font-size: 17px; font-weight: 300; letter-spacing: 2px;
  font-variant: small-caps;
  color: var(--text-dim);
  text-decoration: none; cursor: pointer;
  transition: color 0.3s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--patine-light); border-color: var(--patine-mid); }

/* ══════════════════════════════════════════
   PAGE SYSTEM
══════════════════════════════════════════ */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ══════════════════════════════════════════
   COMPOSANTS TYPOGRAPHIQUES
══════════════════════════════════════════ */
.section-eyebrow {
  font-size: 10px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--patine); margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.84rem, 3.5vw, 3.22rem);
  font-weight: 400; color: var(--text-light); line-height: 1.15;
}
.section-subtitle {
  font-size: 14px; letter-spacing: 2px; color: var(--text-mid);
  font-style: italic; margin-top: 0.4rem;
}

/* Séparateur bronze-patine */
.sep {
  display: flex; align-items: center; gap: 1rem;
  margin: 2rem 0;
}
.sep .line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}
.sep .sym { color: var(--or); font-size: 12px; flex-shrink: 0; }

/* Séparateur de section centré */
.sep-center {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-bottom: 2.5rem;
}
.sep-center .line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-patine));
}
.sep-center .line.r { background: linear-gradient(90deg, var(--border-patine), transparent); }
.sep-center .sym { color: var(--or); font-size: 13px; }

.sec-heading {
  text-align: center; margin-bottom: 2.5rem;
}
.sec-heading h2 {
  font-size: 10px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--patine-light); font-weight: 400;
}
.sec-heading p {
  font-size: 15px; color: var(--text-mid); font-style: italic;
  margin-top: 0.5rem; max-width: 500px; margin-left: auto; margin-right: auto;
}

/* ══════════════════════════════════════════
   CADRES BEAUX-ARTS
══════════════════════════════════════════ */
.bx-frame {
  position: relative;
}
.frame-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3;
}
.portrait-inner {
  width: 100%; overflow: hidden; position: relative; z-index: 1;
  background: var(--bg-surface);
}
.portrait-inner img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
  filter: grayscale(30%) sepia(15%) contrast(1.05) brightness(0.85);
}
.portrait-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(0deg, rgba(14,15,15,0.9) 0%, transparent 65%);
  height: 55%;
}
.portrait-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--text-dim); font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; text-align: center; padding: 1rem;
}

/* ══════════════════════════════════════════
   PROGRESS BARS
══════════════════════════════════════════ */
.prog-wrap { margin-top: 9px; width: 100%; }
.prog-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.prog-top span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }
.prog-top strong { font-size: 12px; color: var(--patine); font-family: sans-serif; }
.prog-bar { height: 1px; background: rgba(255,255,255,0.05); }
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--patine-deep), var(--patine));
  transition: width 1.6s cubic-bezier(0.4,0,0.2,1);
}

/* Statue name */
.s-name {
  margin-top: 9px; font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-mid); text-align: center;
}
.s-years { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; margin-top: 2px; text-align: center; font-style: italic; }
.s-cta { margin-top: 5px; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--patine-mid); opacity: 0; transition: opacity 0.3s; }

/* ══════════════════════════════════════════
   BACK LINK
══════════════════════════════════════════ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer; margin-bottom: 1.5rem;
  transition: color 0.3s; text-decoration: none;
}
.back-link:hover { color: var(--patine-light); }

/* ══════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════ */
.btn-patine {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--patine-mid);
  color: var(--patine-light);
  padding: 11px 2rem;
  font-family: 'Georgia', serif;
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s;
  text-decoration: none;
}
.btn-patine:hover {
  background: rgba(74,139,130,0.1);
  border-color: var(--patine-light);
}
.btn-patine.full { width: 100%; text-align: center; margin-top: 1.2rem; }

/* ══════════════════════════════════════════
   FORMULAIRES
══════════════════════════════════════════ */
.form-label {
  display: block; font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 5px; margin-top: 1rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); color: var(--text-light);
  padding: 9px 12px; font-family: 'Georgia', serif; font-size: 14px;
  outline: none; transition: border-color 0.3s; resize: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--patine-mid);
}
.form-select option { background: #1A1D1D; }

/* ══════════════════════════════════════════
   CARTES / PANNEAUX
══════════════════════════════════════════ */
.panel {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2rem;
  position: relative;
}
.panel::before {
  content: '';
  position: absolute; top: 0; left: 2rem; right: 2rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--patine-deep), transparent);
}
.panel-label {
  font-size: 14px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--patine); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.panel-label::before { content: '⚜'; font-size: 21px; color: var(--or); line-height: 1; }
.panel-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-patine), transparent); }

/* ══════════════════════════════════════════
   TODO / JALONS
══════════════════════════════════════════ */
.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.todo-item:last-child { border-bottom: none; }
.t-status {
  width: 14px; height: 14px; flex-shrink: 0; border: 1px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; margin-top: 2px;
}
.t-status.done { border-color: var(--patine); color: var(--patine); }
.t-status.prog { border-color: var(--bronze-warm); color: var(--bronze-warm); }
.t-status.pend { border-color: var(--text-muted); color: transparent; }
.t-text strong { display: block; font-size: 14px; color: var(--text-light); margin-bottom: 2px; font-weight: 400; }
.t-text span { font-size: 12px; color: var(--text-dim); font-style: italic; }
.t-badge {
  font-size: 8px; letter-spacing: 2px; text-transform: uppercase;
  padding: 2px 6px; border: 1px solid; margin-top: 3px; display: inline-block;
}
.t-badge.done { border-color: rgba(74,139,130,0.4); color: var(--patine); }
.t-badge.prog { border-color: rgba(140,112,80,0.4); color: var(--bronze-warm); }
.t-badge.pend { border-color: var(--border); color: var(--text-dim); }

/* ══════════════════════════════════════════
   FINANCEMENT
══════════════════════════════════════════ */
.fund-stat .v { font-size: 1.61rem; color: var(--text-light); margin-bottom: 2px; }
.fund-stat .l { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-dim); }
.tier {
  border: 1px solid var(--border); padding: 1.2rem; text-align: center;
  cursor: pointer; transition: border-color 0.3s, background 0.3s;
}
.tier:hover { border-color: var(--patine-mid); background: rgba(74,139,130,0.04); }
.tier .ta { font-size: 1.38rem; color: var(--patine-light); margin-bottom: 2px; }
.tier .tn { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.tier .td { font-size: 12px; color: var(--text-mid); font-style: italic; line-height: 1.5; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  padding: 2.5rem 3.5rem 1.8rem;
  border-top: 1px solid var(--border);
  background: var(--bg-mid);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
}
.footer-left { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-center { text-align: center; }
.footer-right { text-align: right; }
.site-footer { position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--patine-deep), transparent);
}
.footer-logo {
  font-family: var(--font-elegante);
  font-size: 18px; font-weight: 300; letter-spacing: 6px; text-transform: uppercase;
  color: var(--text-mid); display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 0.5rem;
}
.footer-logo .lys { color: var(--or); font-size: 28px; line-height: 1; }
.footer-tagline {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim); font-style: italic;
}
.footer-motto {
  font-size: 10px; letter-spacing: 3px; color: var(--patine-deep);
  font-style: italic; text-transform: uppercase;
}
.footer-links { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-links a {
  font-size: 10px; letter-spacing: 2px; color: var(--text-dim);
  text-decoration: none; cursor: pointer; transition: color 0.3s;
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--patine); }
.footer-credit {
  font-size: 9px; color: var(--text-muted); letter-spacing: 2px;
  margin-top: 1.5rem; text-align: center;
  grid-column: 1 / -1;
  border-top: 1px solid var(--border); padding-top: 1rem;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fi { animation: fadeUp 0.9s ease forwards; }
.d1 { animation-delay: 0.1s; opacity: 0; }
.d2 { animation-delay: 0.25s; opacity: 0; }
.d3 { animation-delay: 0.4s; opacity: 0; }
.d4 { animation-delay: 0.55s; opacity: 0; }
.d5 { animation-delay: 0.7s; opacity: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--patine-deep); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .site-nav { padding: 0 1.5rem; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-right { text-align: center; }
  .footer-links { align-items: center; }
}

/* ══════════════════════════════════════════
   ORNEMENTS TYPOGRAPHIQUES
══════════════════════════════════════════ */

/* Filet ornemental doré sous les section-eyebrow */
.section-eyebrow::after {
  content: '';
  display: block; width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--or-deep), transparent);
  margin-top: 6px;
}

/* Élégante fonte pour les titres principaux */
.section-title, .statue-title, .hero-title {
  font-family: var(--font-elegante);
  font-weight: 300;
}

/* Ornement de section avec doubles filets */
.ornement-double {
  display: flex; align-items: center; gap: 1.2rem;
  margin: 0 auto 2.5rem; max-width: 400px;
}
.ornement-double .ext { flex: 1; height: 1px; background: var(--border); }
.ornement-double .mid { display: flex; align-items: center; gap: 6px; }
.ornement-double .mid::before,
.ornement-double .mid::after { content: '—'; color: var(--patine-deep); font-size: 12px; }
.ornement-double .lys-or { color: var(--or); font-size: 28px; line-height: 1; }

/* Quote ornementale */
.ornement-quote {
  position: relative; padding: 2rem 3rem;
  text-align: center; max-width: 640px; margin: 0 auto;
}
.ornement-quote::before,
.ornement-quote::after {
  content: '✦';
  position: absolute; font-size: 14px; color: var(--patine-deep);
}
.ornement-quote::before { top: 0; left: 50%; transform: translateX(-50%); }
.ornement-quote::after  { bottom: 0; left: 50%; transform: translateX(-50%); }

/* Petits tirets d'encadrement sur les panel-label */
.panel-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-patine), transparent);
}

/* Nav active indicator */
.nav-links a.active {
  color: var(--text-mid);
  border-bottom: 1px solid var(--patine-deep);
}

/* Séparateur fin doré pour les cartes importantes */
.sep-or {
  width: 60px; height: 1px; margin: 1rem auto;
  background: linear-gradient(90deg, transparent, var(--or-deep), transparent);
}

/* Fond très légèrement texturé sur le hero */
.hero-ornement-line {
  width: 100%; max-width: 300px; height: 1px; margin: 0.8rem auto 1.6rem;
  background: linear-gradient(90deg, transparent, var(--patine-deep), transparent);
}

/* ══════════════════════════════════════════
   RESPONSIVE COMPLET — Mobile first
══════════════════════════════════════════ */

/* ── Hamburger menu ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  z-index: 600;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-dim);
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
  .site-nav { padding: 0 2rem; height: 58px; }
  .nav-logo { font-size: 17px; letter-spacing: 4px; }
}

@media (max-width: 860px) {
  /* Nav hamburger */
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,11,11,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 550;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.265rem; letter-spacing: 4px; }
  /* Hide maquette button in mobile nav */
  .nav-links .btn-patine { display: none; }

  /* Footer */
  .site-footer { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; padding: 2rem 1.5rem 1.2rem; }
  .footer-right { text-align: center; }
  .footer-links { align-items: center; }

  /* Sections padding */
  .section-bio, .section-galerie, .section-jalons, .section-financement,
  .section-demarche, .section-actu, .section-chiffres, .section-soutiens { padding: 3rem 1.2rem; }

  /* Grilles */
  .bio-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .jalons-grid { grid-template-columns: 1fr; }
  .fund-wrap { grid-template-columns: 1fr; }
  .demarche-grid { grid-template-columns: 1fr; }
  .actu-grid { grid-template-columns: 1fr; }
  .chiffres-grid { grid-template-columns: repeat(2, 1fr); }
  .todo-grid { grid-template-columns: 1fr; }

  /* Split statue pages */
  .split-main { grid-template-columns: 1fr; }
  .panel-gauche, .panel-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: block; /* override flex so viewer has explicit height */
  }
  .panel-right { min-height: 420px; }

  /* Viewer 3D on mobile — fixed height */
  #viewer3d-wrap { flex: none !important; min-height: 380px !important; height: 380px !important; margin-bottom: 1.2rem; }

  /* Bouton maquette — repositionné sous le header sur mobile */
  .statue-header-inner { flex-direction: column; gap: 1rem; padding-top: 2.5rem; }
  .statue-header-inner > .btn-patine {
    position: static !important;
    align-self: flex-start;
    margin-bottom: 0.5rem;
  }
  .statue-meta { flex-wrap: wrap; gap: 0.5rem; }

  /* Statues accueil */
  .statues-row { gap: 1rem; justify-content: center; }
  .side-card .bx-frame { width: 140px; }
  .main .bx-frame { width: 175px; }
  .side-card .portrait-inner { height: 210px; }
  .main .portrait-inner { height: 264px; }

  /* Hero */
  .hero { padding: 90px 1.2rem 3rem; }
  .hero-title { font-size: clamp(1.61rem, 6vw, 2.76rem); }

  /* Section headers */
  .statue-header, .v-hero, .f-hero, .c-hero, .cat-hero { padding: 90px 1.5rem 2rem; }
}

@media (max-width: 480px) {
  /* Statues — stack */
  .statues-row { flex-wrap: wrap; gap: 0.8rem; }
  .side-card .bx-frame { width: calc(50vw - 1.2rem); max-width: 160px; }
  .main .bx-frame { width: calc(60vw - 1rem); max-width: 200px; order: -1; flex: 0 0 100%; }
  .main { transform: none !important; }
  .statue-card.main { transform: none; }
  .statue-card.main:hover { transform: translateY(-5px); }

  /* Hero text */
  .hero-projet { font-size: 12px; letter-spacing: 3px; }
  .hero-subtitle { margin-bottom: 2rem; }

  /* Viewer 3D extra small */
  #viewer3d-wrap { min-height: 300px !important; height: 300px !important; }

  /* Gallery */
  .gallery-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: 1fr; }

  /* Catalog */
  .projet-card { grid-template-columns: 1fr; grid-template-rows: 200px auto; }
  .projet-card.featured { grid-template-columns: 1fr; }
  .pc-img { border-right: none; border-bottom: 1px solid var(--border); }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }
  .contact-main-grid, .presse-grid, .fondateur-grid, .v-grid, .mec-grid, .global-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stats-row, .chiffres-grid, .fund-stats { grid-template-columns: repeat(2, 1fr); }

  /* Fund tiers */
  .fund-tiers, .funding-tiers { grid-template-columns: 1fr; }

  /* Bastion popup */
  .bastion-popup-inner { width: 95%; }
  .bastion-popup-body { padding: 1rem 1.2rem 1.5rem; }

  /* Calendrier jalons */
  .jalons-calendrier { grid-template-columns: 1fr 1fr !important; }

  /* Nav logo — trim on tiny screens */
  .nav-logo .lys { font-size: 21px !important; }
  .nav-logo { font-size: 13px; letter-spacing: 2px; }
}
