/* =========================================================================
   Comité des Fêtes de Grandpuits Bailly-Carrois — design system
   Charte bordeaux & or, polices Source Serif 4 + Mulish.
   ========================================================================= */

:root {
  --bordeaux: #7E2B33;
  --bordeaux-fonce: #6A2229;
  --or: #B8862E;
  --or-btn: #C8901F;
  --or-btn-h: #B07D15;
  --encre: #2A2320;
  --texte-doux: #6E635B;
  --creme: #FAF6F0;
  --creme-fonce: #F3EEE6;
  --bordure: #E8E1D6;
  --blanc: #FFFFFF;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: Mulish, system-ui, sans-serif;
}

/* ---- Base ---- */
body { font-family: var(--sans); color: var(--encre); font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; background: #fff; }
.cdf-serif, .cdf-eyebrow + h1, h1, h2, h3, h4 { font-family: var(--serif); }
a { color: inherit; }

/* Surtitre or */
.cdf-eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--sans); font-weight: 700; color: var(--or);
  text-transform: uppercase; letter-spacing: 2px; font-size: 14px; margin: 0 0 8px;
}
.cdf-eyebrow.has-line::before { content: ""; width: 28px; height: 2px; background: var(--or); display: inline-block; }

/* ---- Boutons ---- */
.cdf-btn, .cdf-btn-outline, .cdf-btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 800; text-decoration: none; cursor: pointer;
  border-radius: 9px; padding: 16px 28px; font-size: 18px; border: none; line-height: 1.2;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cdf-btn { background: var(--bordeaux); color: #fff; box-shadow: 0 12px 28px rgba(126,43,51,.26); }
.cdf-btn:hover { background: var(--bordeaux-fonce); color: #fff; }
.cdf-btn-outline { background: #fff; color: var(--bordeaux); border: 1.5px solid #D6BFA0; font-weight: 700; }
.cdf-btn-outline:hover { border-color: var(--bordeaux); }
.cdf-btn-gold { background: var(--or-btn); color: var(--encre); box-shadow: 0 10px 26px rgba(200,144,31,.45); }
.cdf-btn-gold:hover { background: var(--or-btn-h); color: var(--encre); }
.cdf-btn-link { background: none; border: none; color: var(--bordeaux); font-weight: 700; font-size: 16px; padding: 0; cursor: pointer; border-bottom: 2px solid #DECBB0; text-decoration: none; }
.cdf-btn-link:hover { border-bottom-color: var(--bordeaux); }

/* =========================================================================
   EN-TÊTE
   ========================================================================= */
.cdf-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--bordure);
}
.cdf-header .wp-block-group { gap: 16px; }
.cdf-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.cdf-brand img { width: 54px; height: 54px; object-fit: contain; display: block; }
.cdf-brand b { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--encre); display: block; line-height: 1.2; }
.cdf-brand span { font-size: 12px; font-weight: 700; color: #8A7A6C; letter-spacing: 1.2px; text-transform: uppercase; }
.cdf-header .wp-block-navigation a { font-weight: 600; font-size: 16px; color: #4A4038; padding: 9px 13px; border-radius: 7px; }
.cdf-header .wp-block-navigation a:hover { background: #F6F1E9; color: var(--bordeaux); }

/* =========================================================================
   HERO
   ========================================================================= */
.cdf-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--bordure);
  background: linear-gradient(168deg, #FFFFFF 0%, #FAF6F0 58%, #F3EADC 100%); }
.cdf-hero::before, .cdf-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.cdf-hero::before { top: -130px; right: -70px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(184,134,46,.16), transparent 70%); }
.cdf-hero::after { bottom: -170px; left: -120px; width: 460px; height: 460px; background: radial-gradient(circle, rgba(126,43,51,.07), transparent 70%); }
.cdf-hero .wp-block-columns { position: relative; gap: 56px; align-items: center; }
.cdf-hero h1 { font-size: clamp(40px,6vw,72px); line-height: 1.02; margin: 12px 0 16px; color: var(--encre); text-wrap: balance; }
.cdf-hero-baseline { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(21px,2.7vw,28px); line-height: 1.3; color: var(--bordeaux); margin: 0 0 16px; }
.cdf-hero-lead { font-size: clamp(17px,2.1vw,20px); color: var(--texte-doux); max-width: 540px; margin: 0 0 34px; }

/* Carte À la une */
.cdf-featured { background: #fff; border: 1px solid #E8D9C9; border-radius: 18px; overflow: hidden;
  max-width: 480px; margin: 0 auto; box-shadow: 0 24px 58px rgba(42,35,32,.16);
  animation: cdfFloat 4s ease-in-out infinite; }
.cdf-featured-head { display: flex; align-items: center; gap: 11px; background: var(--bordeaux); color: #fff;
  padding: 14px 24px; font-weight: 700; font-size: 13px; letter-spacing: 1.8px; text-transform: uppercase; }
.cdf-featured-head::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: cdfBlink 1.6s ease-in-out infinite; }
.cdf-featured-body { background: var(--creme-fonce); padding: 24px 26px 28px; }
.cdf-featured-body img { display: block; max-width: 100%; border-radius: 8px; box-shadow: 0 10px 28px rgba(42,35,32,.22); margin: 0 auto 18px; }
.cdf-featured-date { font-weight: 700; color: #9C6E1F; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; }
.cdf-featured-body h2, .cdf-featured-body h3 { font-size: 30px; line-height: 1.15; margin: 7px 0 18px; color: var(--encre); }
.cdf-featured .cdf-btn-gold { width: 100%; font-size: 21px; padding: 20px; border-radius: 11px; }
.cdf-featured-note { text-align: center; font-size: 13px; color: #9A8C7E; margin: 11px 0 0; font-weight: 600; }

/* =========================================================================
   SECTIONS GÉNÉRIQUES
   ========================================================================= */
.cdf-section { padding: 72px 24px; }
.cdf-section--creme { background: var(--creme); border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.cdf-section__head h2 { font-size: clamp(28px,3.6vw,40px); margin: 0; color: var(--encre); }
.cdf-section__head p { font-size: 18px; color: var(--texte-doux); margin: 10px 0 0; }

/* =========================================================================
   AGENDA / ÉVÉNEMENTS — carrousel CSS (scroll-snap)
   ========================================================================= */
.cdf-events { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; margin: 0 -4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.cdf-events > * { scroll-snap-align: start; }
.cdf-event-card { flex: none; width: 288px; background: #fff; border: 1px solid var(--bordure);
  border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(42,35,32,.05); transition: box-shadow .2s ease, border-color .2s ease; }
.cdf-event-card:hover { box-shadow: 0 12px 28px rgba(42,35,32,.10); border-color: #DCD2C4; }
.cdf-event-card__media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--creme-fonce); }
.cdf-event-card__media .wp-block-image, .cdf-event-card__media figure { margin: 0; height: 100%; }
.cdf-event-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdf-agenda-row__media .wp-block-image, .cdf-agenda-row__media figure { margin: 0; height: 100%; }
.cdf-team .wp-block-image, .cdf-team figure { margin: 0; }
.cdf-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); color: var(--bordeaux);
  font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 5px 11px; border-radius: 5px; }
.cdf-event-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.cdf-event-card__date { font-weight: 700; color: var(--or); font-size: 15px; }
.cdf-event-card h3 { font-size: 20px; line-height: 1.25; margin: 6px 0 9px; color: var(--encre); }
.cdf-event-card p { font-size: 15px; color: var(--texte-doux); margin: 0 0 18px; flex: 1; }

/* Agenda — liste pleine largeur */
.cdf-agenda-list { display: flex; flex-direction: column; gap: 16px; }
.cdf-agenda-row { background: #fff; border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden;
  display: grid; grid-template-columns: 240px 1fr; box-shadow: 0 1px 3px rgba(42,35,32,.05); }
.cdf-agenda-row__media { position: relative; background: var(--creme-fonce); min-height: 200px; }
.cdf-agenda-row__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdf-agenda-row__body { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.cdf-agenda-row__body h2 { font-size: 24px; margin: 5px 0 8px; }
.cdf-agenda-row__body p { font-size: 16px; color: var(--texte-doux); margin: 0 0 18px; }

/* =========================================================================
   COURS
   ========================================================================= */
.cdf-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px,1fr)); gap: 22px; }
.cdf-course-card { background: #fff; border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(42,35,32,.04); transition: box-shadow .2s ease; }
.cdf-course-card:hover { box-shadow: 0 12px 28px rgba(42,35,32,.10); }
.cdf-course-card__bar { height: 4px; background: var(--bordeaux); }
.cdf-course-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.cdf-course-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cdf-avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #F0E6D6; display: flex; align-items: center; justify-content: center; }
.cdf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdf-avatar--initial { color: var(--bordeaux); font-family: var(--serif); font-weight: 700; font-size: 23px; }
.cdf-course-card h3 { font-size: 21px; margin: 0 0 1px; color: var(--encre); }
.cdf-course-card__prof { font-size: 14px; color: #9A8C7E; font-weight: 600; }
.cdf-course-card p { font-size: 15px; color: var(--texte-doux); margin: 0 0 18px; flex: 1; }

/* =========================================================================
   ASSOCIATION
   ========================================================================= */
.cdf-assoc .wp-block-columns { gap: 56px; align-items: flex-start; }
.cdf-assoc p { font-size: 18px; color: var(--texte-doux); }
.cdf-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden; }
.cdf-stats > div { padding: 24px 18px; text-align: center; border-right: 1px solid var(--bordure); }
.cdf-stats > div:last-child { border-right: none; }
.cdf-stats__num { font-family: var(--serif); font-weight: 700; font-size: 38px; color: var(--bordeaux); line-height: 1; }
.cdf-stats__label { font-size: 14px; font-weight: 600; color: var(--texte-doux); margin-top: 7px; }
.cdf-histo-box { background: var(--creme); border: 1px solid var(--bordure); border-radius: 14px; padding: 30px 30px 26px; }
.cdf-histo-box h3 { font-size: 24px; margin: 6px 0 14px; }
.cdf-histo-row { display: flex; gap: 20px; padding: 13px 0; border-bottom: 1px solid #EAE1D3; }
.cdf-histo-row b { flex: none; font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--or); width: 50px; }
.cdf-histo-row span { font-size: 17px; color: #4A4038; }

/* =========================================================================
   ÉQUIPE
   ========================================================================= */
.cdf-president { display: flex; align-items: center; gap: 22px; background: var(--creme); border: 1px solid var(--bordure);
  border-radius: 14px; padding: 22px 26px; margin-bottom: 30px; flex-wrap: wrap; }
.cdf-president img { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(42,35,32,.18); }
.cdf-tag { display: inline-block; background: #F0E6D6; color: var(--bordeaux); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 11px; border-radius: 5px; margin-bottom: 7px; }
.cdf-president h3 { font-size: 24px; margin: 0; }
.cdf-president p { font-size: 16px; color: var(--texte-doux); margin: 3px 0 0; }
.cdf-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 20px; }
.cdf-team figure { margin: 0; text-align: center; }
.cdf-team figure > .cdf-team__img, .cdf-team figure img { aspect-ratio: 1; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--bordure); background: var(--creme-fonce); object-fit: cover; display: block; }
.cdf-team figcaption { font-weight: 700; font-size: 16px; color: var(--encre); margin-top: 11px; }
.cdf-team figcaption small { display: block; font-size: 13px; color: #9A8C7E; font-weight: 600; }

/* =========================================================================
   CONTACT
   ========================================================================= */
.cdf-contact .wp-block-columns { gap: 54px; align-items: flex-start; }
.cdf-contact-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--bordure);
  border-radius: 10px; padding: 18px 20px; text-decoration: none; color: var(--encre); margin-bottom: 12px; transition: border-color .18s ease; }
.cdf-contact-card:hover { border-color: #D6BFA0; }
.cdf-contact-card__ico { flex: none; width: 42px; height: 42px; border-radius: 8px; background: #F0E6D6; color: var(--bordeaux); display: flex; align-items: center; justify-content: center; }
.cdf-contact-card small { display: block; font-size: 13px; color: #9A8C7E; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.cdf-contact-card b { font-size: 18px; font-weight: 700; color: var(--encre); }
.cdf-form { background: #fff; border: 1px solid var(--bordure); border-radius: 14px; padding: 32px; box-shadow: 0 8px 28px rgba(42,35,32,.07); }
.cdf-form h3 { font-size: 23px; margin: 0 0 20px; }
.cdf-form input, .cdf-form textarea, .cdf-form select { width: 100%; font-size: 17px; font-family: var(--sans); padding: 13px 14px; border: 1.5px solid #E0D8CB; border-radius: 8px; background: #FCFAF6; color: var(--encre); }
.cdf-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: #4A4038; }
.cdf-newsletter { background: #fff; border: 1px solid var(--bordure); border-radius: 14px; padding: 30px; box-shadow: 0 8px 28px rgba(42,35,32,.06); }
.cdf-newsletter h3 { font-size: 22px; margin: 0 0 8px; }
.cdf-newsletter p { margin: 0; font-size: 16px; color: var(--texte-doux); }

/* =========================================================================
   PAGE COURS — détail
   ========================================================================= */
.cdf-course-hero { background: var(--bordeaux); color: #fff; padding: 44px 24px 52px; }
.cdf-course-hero .cdf-eyebrow { color: #E6BFA0; }
.cdf-course-hero h1 { color: #fff; font-size: clamp(32px,5.2vw,52px); margin: 8px 0 12px; }
.cdf-course-hero p { font-size: 19px; color: #F0DDD7; max-width: 620px; margin: 0; }
.cdf-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; margin-bottom: 34px; }
.cdf-info-card { background: #fff; border: 1px solid var(--bordure); border-radius: 12px; padding: 24px; }
.cdf-info-card h3 { font-size: 20px; margin: 0 0 10px; }
.cdf-info-card p { font-size: 16px; color: var(--texte-doux); margin: 0; white-space: pre-line; }
.cdf-note { background: var(--creme); border: 1px solid var(--bordure); border-radius: 12px; padding: 22px 26px; margin-bottom: 34px; font-size: 17px; color: #4A4038; }

/* details / FAQ */
.cdf-faq details, details.cdf-year { background: #fff; border: 1px solid var(--bordure); border-radius: 10px; margin-bottom: 12px; }
.cdf-faq summary, details.cdf-year summary { cursor: pointer; font-family: var(--serif); font-weight: 600; font-size: 18px; padding: 18px 22px; color: var(--encre); list-style: none; }
.cdf-faq summary::-webkit-details-marker, details.cdf-year summary::-webkit-details-marker { display: none; }
.cdf-faq details p { font-size: 16px; color: var(--texte-doux); margin: 0; padding: 0 22px 18px; }

/* =========================================================================
   HISTORIQUE
   ========================================================================= */
.cdf-histo-hero { background: linear-gradient(168deg, #FFFFFF 0%, #FAF6F0 100%); border-bottom: 1px solid var(--bordure); padding: 60px 24px; }
.cdf-timeline { border-left: 2px solid #E3D6C2; padding-left: 30px; display: flex; flex-direction: column; gap: 24px; }
.cdf-timeline > div { position: relative; }
.cdf-timeline > div::before { content: ""; position: absolute; left: -38px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bordeaux); border: 3px solid var(--creme); box-shadow: 0 0 0 1px var(--bordeaux); }
.cdf-timeline b { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--or); line-height: 1.1; display: block; }
.cdf-timeline span { font-size: 18px; color: var(--encre); }
details.cdf-year summary { display: flex; align-items: center; justify-content: space-between; }
details.cdf-year .cdf-year__count { font-size: 14px; font-weight: 700; color: var(--bordeaux); background: var(--creme-fonce); padding: 4px 12px; border-radius: 999px; }
details.cdf-year ul { margin: 0; padding: 0 22px 20px 40px; display: flex; flex-direction: column; gap: 7px; }
details.cdf-year li { font-size: 16px; color: #4A4038; }

/* =========================================================================
   PIED DE PAGE
   ========================================================================= */
.cdf-footer { background: #F1EADF; border-top: 1px solid #E2D8C8; color: var(--texte-doux); padding: 48px 24px 34px; }
.cdf-footer h4 { font-family: var(--serif); font-size: 16px; color: var(--encre); margin: 0 0 12px; }
.cdf-footer p, .cdf-footer a { font-size: 15px; color: var(--texte-doux); text-decoration: none; }
.cdf-footer a:hover { color: var(--bordeaux); }
.cdf-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cdf-footer__brand img { width: 48px; height: 48px; object-fit: contain; }
.cdf-footer__brand b { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--encre); }
.cdf-footer__legal { max-width: 1180px; margin: 30px auto 0; border-top: 1px solid #E2D8C8; padding-top: 20px; font-size: 13px; color: #9A8C7E; }

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes cdfFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes cdfBlink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes cdfArrow { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.cdf-arrow { display: inline-block; animation: cdfArrow 1.3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .cdf-featured, .cdf-arrow, .cdf-featured-head::before { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 880px) {
  .cdf-section { padding: 56px 20px; }
  .cdf-hero .wp-block-columns, .cdf-assoc .wp-block-columns, .cdf-contact .wp-block-columns { gap: 36px; }
  .cdf-agenda-row { grid-template-columns: 1fr; }
  .cdf-agenda-row__media { min-height: 220px; }
}
@media (max-width: 600px) {
  .cdf-stats { grid-template-columns: 1fr 1fr; }
  .cdf-stats > div:nth-child(2) { border-right: none; }
  .cdf-team { grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); }
}

/* Cibles tactiles ≥ 44px (accessibilité seniors) */
.cdf-btn, .cdf-btn-outline, .cdf-btn-gold, .cdf-header .wp-block-navigation a, .cdf-contact-card { min-height: 44px; }
