/* ============================================================
   ShengDi — CSS Principal
   Charte calquée sur AGENDAM : Nature, Forêt, Lumière, Terre
   Typo : Cinzel (display) + Cormorant Garamond (titres/texte) + Jost (UI)
   ============================================================ */

:root {
  /* Fonds — du plus clair au plus profond */
  --bg-light:   #f4f1eb;
  --bg-mid:     #ede6d8;
  --bg-deep:    #e2d9c8;
  --bg-section: #eae4d6;

  /* Verts nature */
  --forest:     #2d5016;
  --forest-dark:#1e3610;
  --moss:       #4a6741;
  --sage:       #6b8c5a;
  --fern:       #8aab72;
  --mint:       #c8ddb8;

  /* Terres & ors */
  --earth:      #6b4226;
  --bark:       #8b5e3c;
  --gold:       #b8922a;
  --amber:      #d4a843;
  --honey:      #e8c876;

  /* Textes */
  --text:       #2a2018;
  --text-mid:   #4a3d2e;
  --text-light: #7a6a58;
  --text-muted: #a09080;

  /* Utilitaires */
  --white:      #fdfaf5;
  --border:     rgba(107,66,38,0.18);
  --border-gold:rgba(184,146,42,0.3);
  --shadow:     rgba(42,32,24,0.12);

  --font-display: 'Cinzel', serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Jost', sans-serif;

  --radius:    4px;
  --radius-lg: 12px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --max-w:     1180px;
}

/* --- Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.2;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--forest);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-family: var(--font-display); font-size: clamp(0.1rem, 4.5vw, 2.0rem); font-weight: 400; letter-spacing: 0.01em; line-height: 0.5;}
h2 { font-size: clamp(1.3rem, 5vw, 1.6rem); line-height: 1.2; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus-visible { color: var(--forest); }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 0.5rem;
}

.lettre-cle { color: var(--gold); }

.logo-img { height: 57px; width: auto; display: block;}

section { padding: 1.5rem 0; }
section.tight { padding: 1.5rem 0; }

.section-alt { background: var(--bg-section); }
.section-forest { background: var(--forest); color: var(--mint); }
.section-forest h1, .section-forest h2, .section-forest h3 { color: var(--white); }
.section-forest p { color: var(--mint); }

/* Séparateur organique */
.divider { width: 100%; height: 28px; background: var(--bg-light); }
.divider svg { width: 100%; height: 100%; display: block; }
.divider svg path { fill: var(--bg-light) !important; }

/* Filet doré, à la manière des séparateurs agendam */
.gold-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; margin: 0 0 1.5rem;
}
.gold-rule::before, .gold-rule::after {
  content: ''; width: 60px; height: 1px; background: var(--gold); opacity: 0.6;
}
.gold-rule span { color: var(--gold); font-size: 0.9rem; }

/* --- Boutons ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--forest);
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover, .btn:focus-visible { background: var(--forest); color: var(--white); transform: translateY(-2px); }

.btn-primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(45,80,22,0.25);
}

.btn-light {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
  background: transparent;
}
.btn-light:hover, .btn-light:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--forest);
}

/* --- En-tête / navigation ------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  background: rgba(244,241,235,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  box-shadow: 0 2px 20px var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  height: 76px;
  padding: 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--forest);
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo .logo-symbol { font-size: 0.7rem; opacity: 0.65; color: var(--gold); }
.logo span.clay, .logo span { color: var(--gold); }
.logo:hover { color: var(--moss); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--forest);
  transition: all var(--transition);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  display: block;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--forest);
  transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--forest); }
.main-nav a:hover::after, .main-nav a.active::after { left: 0.9rem; right: 0.9rem; }

/* --- Contenu principal (compense le header fixe) --------------- */
.site-main { padding-top: 76px; }

/* --- Pied de page --------------------------------------------- */
.site-footer {
  background: var(--forest);
  color: var(--mint);
  padding: 0.5rem 0 0.5rem;
}
.site-footer a { color: var(--mint); }
.site-footer a:hover { color: var(--white); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: block;
}
.footer-brand p { font-size: 0.95rem; color: var(--mint); line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 1.1rem;
}
.footer-links ul, .footer-contact ul { list-style: none; margin: 0; padding: 0; }
.footer-links li, .footer-contact li { margin-bottom: 0.5rem; }
.footer-links a, .footer-contact p, .footer-contact a {
  display: block; font-size: 0.92rem; color: var(--mint); margin-bottom: 0.5rem;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(200,221,184,0.6);
  padding: 0.1rem 0;   /* réduit la hauteur — ajuste selon le rendu actuel */
  line-height: 0.1;    /* évite un espacement vertical excessif du texte */
}
.footer-symbols { letter-spacing: 0.5em; color: var(--honey); opacity: 0.6; }

/* --- Liens PDF ---------------------------------------------- */
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--forest);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem; 
}
.pdf-link:hover { color: var(--forest-dark); }

/* --- Hero Accueil ---------------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(160deg, rgba(31,61,43,0.45) 0%, rgba(20,41,29,0.55) 100%),
    url("../img/hero-foret.jpg") center/cover no-repeat;
  color: var(--white);
  padding: 1rem 0 1rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 0.4rem 0 0.1rem;
}

.hero-eyebrow-text {
  font-family: var(--font-ui);
  color: var(--honey);
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.hero p.lead {
  color: var(--mint);
  font-size: 1.15rem;
  font-weight: 300;
  max-width: 46ch;
}

.video-block {
  position: relative; 
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;          /* centré */
  aspect-ratio: 16 / 9;
  background: #1c1c1e;
  border: 1px solid #b8975a;  /* liseré or */
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.video-block video,
.video-block iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

@media (max-width: 600px) {
  .video-block { width: 100%; }  /* pleine largeur sur mobile */
}

/* --- Compte à rebours -------------------------------------------- */
.countdown-card {
  background: var(--forest-dark);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.countdown-card .numero {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 0.2rem;
}
.countdown-card .date-syntonisation {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; }
.countdown .unit {
  text-align: center;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 0.2rem 0.2rem;
}
.countdown .unit .value {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 2.5vw, 1.2rem);
  font-weight: bold;
  color: var(--honey);
  display: block;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}
.countdown .unit .label {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--mint);
  text-transform: lowercase;
}
.countdown-passe { color: var(--mint); font-style: italic; }

/* --- Cartes actualités / vidéos ----------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all var(--transition);
}
.card:hover { border-color: var(--border-gold); box-shadow: 0 12px 32px var(--shadow); transform: translateY(-4px); }
.card .eyebrow {
  font-family: var(--font-ui);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}
.card h3 { margin-bottom: 0.5rem; font-family: var(--font-body); }
.card .date { font-family: var(--font-ui); color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.6em; }

/* --- Vidéo mise en avant / player ----------------------------------- */
.video-feature { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--earth);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed .no-video {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem;
}

/* --- Liste des vidéos (rubrique Vidéos) ------------------------------ */
.video-list { display: flex; flex-direction: column; gap: 0.4rem; align-items: center; }
.video-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.0rem;
  align-items: center;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  max-width: 500px;   /* ajoute cette ligne pour que la ligne ne s'étire pas sur toute la largeur */
  width: 100%;
}
.video-item:last-child { border-bottom: none; }
.video-item .numero-badge {
  font-family: var(--font-display);
  font-size: 1.2rem;       /* 1.1rem → 1.6rem, nettement plus grand */
  font-weight: 700;        /* ajoute du gras pour accentuer */
  color: var(--forest);    /* optionnel : plus foncé que le doré clair */
  text-align: right;
}
.video-item .reference {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.video-item h3 a { color: var(--forest); }   /* #2a2018 — brun foncé, au lieu du doré clair */
.video-item h3 a:hover { color: var(--gold); }   /* garde le doré au survol */
.play-icon {
  display: inline-flex;
  vertical-align: -0.15em;
  font-size: 1.3em;
  color: var(--gold);
  margin-right: 0.3em;
}

/* --- Duo "Dernière / Prochaine vidéo" (Accueil) ---------------------- */
.section-videos { padding-top: 0.4rem; }
.videos-duo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.video-duo-card { display: flex; flex-direction: column; width: 360px; max-width: 100%; }
.video-duo-card h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.05rem, 4.5vw, 1.3rem);
  line-height: 1.2;
  min-height: 2.5em;
  display: flex;
  align-items: flex-end;
}

.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--earth);
  box-shadow: 0 4px 20px var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.video-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
a.video-thumb:hover, a.video-thumb:focus-visible {
  box-shadow: 0 12px 32px var(--shadow);
  transform: translateY(-3px);
}
.video-thumb-soon img { filter: saturate(0.85); }
.video-thumb-vide {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--mint);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 1rem;
}

/* --- Formulaires ---------------------------------------------------- */
.form-field { margin-bottom: 1rem; }  
.form-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.1rem;
}
.form-field input, .form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;                            /* taille du texte : 1.3rem → 1rem */
  padding: 0.35rem 0.5rem;                     /* espace intérieur du champ : réduit un peu */
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(45,80,22,0.1);
}
.form-field textarea { resize: vertical; min-height: 130px; }

.form-note { font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-muted); }

.alert {
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.alert-success { background: rgba(45,80,22,0.1); border: 1px solid rgba(45,80,22,0.3); color: var(--forest); }
.alert-error   { background: rgba(160,40,40,0.08); border: 1px solid rgba(160,40,40,0.25); color: #8b2020; }

/* --- Page héros secondaire (pages internes) --------------------------- */
.page-hero {
  background: linear-gradient(160deg, var(--mint) 0%, var(--bg-mid) 55%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1.5rem;
}
.page-hero h1 { color: var(--forest); }
.page-hero p { color: var(--text-mid); max-width: 60ch; font-size: 1.1rem; }

/* --- Liste à puces "feuille" -------------------------------------- */
.liste-nature { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.liste-nature li { position: relative; padding-left: 1.6rem; margin-bottom: 0.9rem; color: var(--text-mid); }
.liste-nature li::before {
  content: '✦';
  position: absolute;
  left: 0; top: -0.05em;
  color: var(--gold);
  font-size: 0.75rem;
}

/* --- Association : bloc coordonnées --------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}
.info-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all var(--transition);
}
.info-block:hover { border-color: var(--border-gold); box-shadow: 0 12px 32px var(--shadow); transform: translateY(-3px); }
.info-block h4 {
  margin-bottom: 0.4rem;
  color: var(--forest);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero-grid, .video-feature { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .videos-duo { gap: 2.2rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: rgba(244,241,235,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow);
    padding: 1rem 1.5rem 1.5rem;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav a { padding: 0.9rem 0.5rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .video-item { grid-template-columns: 60px 1fr; }
  .countdown .unit .value { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}