/* =================================================================
   PADMAF ATELIERS — Feuille de style
   -----------------------------------------------------------------
   ISOLATION : chaque règle est préfixée ".atf-scope" — aucune balise
   HTML brute (a, button, h1...) n'est jamais stylée seule, donc ce
   fichier ne peut affecter aucun élément en dehors des blocs Ateliers,
   même chargé globalement sur tout le site.

   SOMMAIRE :
     1. Réglages (variables CSS)
     2. Typographie générale
     3. Hero (en-tête de la page Ateliers & Formations)
     4. Boutons
     5. Filtres (barre de pilules)
     6. Grille / Cartes d'atelier
     7. Image de mise en avant sur la carte
     8. Page individuelle d'un atelier (single-ateliers.php)
     9. Contenu associé (autres activités / autres ateliers)
    10. Calendrier (timeline)
    11. Bloc CTA final
    12. Accessibilité
    13. Animations au scroll
    14. Responsive (768px mobile / 992px tablette)
   ================================================================= */

/* ---------- 1. Réglages ---------- */
.atf-scope, .atf-scope *, .atf-scope *::before, .atf-scope *::after {
  box-sizing: border-box;
}

.atf-scope {
  --gold: #C9A84C;
  --dark: #0D0D0D;
  --white: #FFFFFF;
  --light: #F5F5F7;
  --purple: #7B2FBE;
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-pill: 100px;
  --shadow-soft: 0 10px 30px rgba(13,13,13,0.08);
  --shadow-hover: 0 16px 40px rgba(13,13,13,0.14);
  --section-pad-y: clamp(40px, 6vw, 80px);
  --section-pad-x: clamp(24px, 6vw, 80px);
  font-family: 'Rubik', sans-serif;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 2. Typographie générale ---------- */
.atf-scope .atf-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.atf-scope .atf-sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.atf-scope .atf-h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.1; font-weight: 700; margin: 16px 0; }
.atf-scope .atf-h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; font-weight: 700; margin: 0 0 12px; }
.atf-scope .atf-h2-sm { font-size: clamp(1.3rem, 2.8vw, 1.8rem); line-height: 1.25; font-weight: 700; margin: 0 0 20px; }
.atf-scope .atf-h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; margin: 4px 0 10px; }
.atf-scope .atf-h3-sm { font-size: clamp(1rem, 1.8vw, 1.15rem); font-weight: 700; margin: 0 0 4px; }
.atf-scope .atf-lead { font-size: clamp(0.98rem, 1.6vw, 1.1rem); color: #4A4A4A; max-width: 760px; margin: 0 0 32px; }
.atf-scope .atf-card-text { font-size: clamp(0.9rem, 1.3vw, 0.98rem); color: #4A4A4A; line-height: 1.55; }
.atf-scope .atf-eyebrow {
  text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8rem;
  font-weight: 600; color: var(--gold); margin: 0;
}
.atf-scope .atf-eyebrow-light { color: var(--purple); }

/* ---------- 3. Hero ---------- */
.atf-scope .atf-hero {
  background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%);
  padding: var(--section-pad-y) var(--section-pad-x);
  text-align: center;
}
.atf-scope .atf-hero-inner { max-width: 820px; margin: 0 auto; }
.atf-scope .atf-hero-text { font-size: clamp(1rem, 1.6vw, 1.15rem); color: #4A4A4A; margin-bottom: 32px; }
.atf-scope .atf-hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 32px; }
.atf-scope .atf-hero-stats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
  font-size: 0.9rem; font-weight: 600;
}
.atf-scope .atf-hero-stats li { display: flex; align-items: center; gap: 8px; }
.atf-scope .atf-hero-stats i { color: var(--gold); }

/* ---------- 4. Boutons ---------- */
.atf-scope .atf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 2px solid transparent;
}
.atf-scope .atf-btn-small { padding: 10px 20px; font-size: 0.88rem; }
.atf-scope .atf-btn-primary { background: var(--gold); color: var(--dark); box-shadow: var(--shadow-soft); }
.atf-scope .atf-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.atf-scope .atf-btn-ghost { background: transparent; color: var(--dark); border-color: var(--dark); }
.atf-scope .atf-btn-ghost:hover { background: var(--dark); color: var(--white); }

/* ---------- 5. Filtres ---------- */
.atf-scope .atf-filters-section { padding: var(--section-pad-y) var(--section-pad-x) 0; }
.atf-scope .atf-filterbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.atf-scope .atf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--light);
  background: var(--light);
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.atf-scope .atf-chip i { color: var(--gold); }
.atf-scope .atf-chip-purple i { color: var(--purple); }
.atf-scope .atf-chip:hover { border-color: var(--gold); }
.atf-scope .atf-chip.is-active { background: var(--dark); border-color: var(--dark); color: var(--white); }
.atf-scope .atf-chip.is-active i { color: var(--gold); }
.atf-scope .atf-chip-purple.is-active i { color: #D9B8F5; }

/* ---------- 6. Grille / Cartes d'atelier ---------- */
.atf-scope .atf-grid-section { padding: 40px var(--section-pad-x) var(--section-pad-y); }
.atf-scope .atf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.atf-scope .atf-card {
  background: var(--white);
  border: 1px solid #ECECEC;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* nécessaire pour l'image d'en-tête aux coins arrondis */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.atf-scope .atf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.atf-scope .atf-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.atf-scope .atf-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.atf-scope .atf-badge {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(201,168,76,0.12); color: #8A6D1F;
  padding: 6px 12px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 6px;
}
.atf-scope .atf-badge i { color: inherit; } /* protège contre un style de thème externe sur <i> */
.atf-scope .atf-badge-purple { background: rgba(123,47,190,0.12); color: var(--purple); }
.atf-scope .atf-icon-circle {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--dark); color: var(--gold);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 1.1rem;
}
.atf-scope .atf-icon-purple { background: var(--purple); color: var(--white); }
.atf-scope .atf-icon-muted { background: var(--light); color: #9A9A9A; margin: 0 auto 16px; }
.atf-scope .atf-card-kicker {
  font-size: 0.78rem; font-weight: 600; color: #9A9A9A;
  text-transform: uppercase; letter-spacing: 0.5px; margin: 0;
}
.atf-scope .atf-card-title-link { color: inherit; text-decoration: none; }
.atf-scope .atf-card-title-link:hover { color: var(--gold); }
.atf-scope .atf-meta {
  list-style: none; padding: 0; margin: 16px 0 20px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 0.88rem;
}
.atf-scope .atf-meta li { display: flex; align-items: flex-start; gap: 10px; }
.atf-scope .atf-meta i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.atf-scope .atf-card-actions {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 8px;
}
.atf-scope .atf-card-link {
  font-size: 0.85rem; font-weight: 600; color: var(--purple); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.atf-scope .atf-card-link:hover { text-decoration: underline; }
.atf-scope .atf-empty {
  text-align: center; max-width: 480px; margin: 24px auto 0;
  padding: 40px 24px; border: 1px dashed #DDD; border-radius: var(--radius-l);
}

/* ---------- 7. Image de mise en avant sur la carte ---------- */
.atf-scope .atf-card-image-link { display: block; }
.atf-scope .atf-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--light); }
.atf-scope .atf-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.atf-scope .atf-card:hover .atf-card-image img { transform: scale(1.05); }

/* ---------- 8. Page individuelle d'un atelier ---------- */
.atf-scope .atf-single-hero {
  position: relative;
  height: clamp(220px, 40vw, 420px);
  background-size: cover;
  background-position: center;
}
.atf-scope .atf-single-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0) 40%, rgba(13,13,13,0.55) 100%);
}
.atf-scope .atf-single-inner { max-width: 820px; padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }
.atf-scope .atf-meta-single { margin: 20px 0 32px; }
.atf-scope .atf-single-content { font-size: clamp(1rem, 1.4vw, 1.05rem); line-height: 1.75; color: #333; margin-bottom: 40px; }
.atf-scope .atf-single-content p { margin: 0 0 20px; }
.atf-scope .atf-single-content h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin: 32px 0 14px; font-weight: 700; }
.atf-scope .atf-single-content h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin: 24px 0 10px; font-weight: 700; }
.atf-scope .atf-single-content ul,
.atf-scope .atf-single-content ol { margin: 0 0 20px 20px; }
.atf-scope .atf-single-content img { max-width: 100%; height: auto; border-radius: var(--radius-m); margin: 20px 0; }
.atf-scope .atf-single-actions { border-top: 1px solid #ECECEC; padding-top: 28px; }

/* ---------- 9. Contenu associé (autres activités / autres ateliers) ---------- */
.atf-scope .atf-related { padding: 48px 0; border-top: 1px solid #ECECEC; }
.atf-scope .atf-related-alt { background: var(--light); }
.atf-scope .atf-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.atf-scope .atf-mini-card {
  display: flex; flex-direction: column;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.atf-scope .atf-mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.atf-scope .atf-mini-card-image { aspect-ratio: 16 / 10; background: var(--light); overflow: hidden; }
.atf-scope .atf-mini-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atf-scope .atf-mini-card-body { padding: 14px 16px; }
.atf-scope .atf-mini-card-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gold); display: block; margin-bottom: 6px;
}
.atf-scope .atf-mini-card-title { font-size: 0.95rem; font-weight: 700; margin: 0; }

/* ---------- 10. Calendrier ---------- */
.atf-scope .atf-calendar-section { background: var(--dark); color: var(--white); padding: var(--section-pad-y) var(--section-pad-x); }
.atf-scope .atf-calendar-section .atf-h2 { color: var(--white); }
.atf-scope .atf-timeline {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.atf-scope .atf-timeline-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-m);
  padding: 20px;
}
.atf-scope .atf-timeline-date {
  display: inline-block; background: var(--gold); color: var(--dark);
  font-weight: 700; font-size: 0.8rem;
  padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: 12px;
}
.atf-scope .atf-timeline-content p { margin: 0; color: #D5D5D5; font-size: 0.9rem; }
.atf-scope .atf-note { margin-top: 28px; color: #B9B9B9; font-size: 0.88rem; }
.atf-scope .atf-note a { color: var(--gold); }

/* ---------- 11. Bloc CTA final ---------- */
.atf-scope .atf-cta-section { padding: var(--section-pad-y) var(--section-pad-x); background: var(--light); }
.atf-scope .atf-cta-inner { text-align: center; max-width: 700px; margin: 0 auto; }

/* ---------- 12. Accessibilité ---------- */
.atf-scope a:focus-visible,
.atf-scope button:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

/* ---------- 13. Animations au scroll ---------- */
.atf-scope .atf-animate {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.atf-scope .atf-animate.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .atf-scope .atf-animate { opacity: 1 !important; transform: none !important; transition: none !important; }
  .atf-scope .atf-card:hover,
  .atf-scope .atf-btn-primary:hover { transform: none; }
}

/* ---------- 14. Responsive : 768px (mobile), 992px (tablette) ---------- */
@media (max-width: 992px) {
  .atf-scope .atf-hero,
  .atf-scope .atf-filters-section,
  .atf-scope .atf-grid-section,
  .atf-scope .atf-calendar-section,
  .atf-scope .atf-cta-section {
    padding-left: 40px; padding-right: 40px;
  }
}

@media (max-width: 768px) {
  .atf-scope .atf-hero,
  .atf-scope .atf-filters-section,
  .atf-scope .atf-grid-section,
  .atf-scope .atf-calendar-section,
  .atf-scope .atf-cta-section {
    padding-left: 24px; padding-right: 24px;
  }
  .atf-scope .atf-card-actions { flex-direction: column; align-items: flex-start; }
  .atf-scope .atf-hero-actions,
  .atf-scope .atf-filterbar { justify-content: flex-start; }
}