/* ============================================================
   DHR ACADEMY — feuille de style
   Palette : coral + ink (corail chaleureux, encre profonde)
   Typo    : Fraunces (titres) + DM Sans (texte)
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #fff5f2;
  --surface-2: #fbf1ee;
  --ink: #1f2333;
  --ink-soft: #4a4f63;
  --ink-mute: #6b7086;
  --accent: #ff6f61;
  --accent-ink: #b23a2c;      /* corail lisible sur fond clair */
  --accent-deep: #d94a3d;
  --secondary: #2a9d8f;
  --rule: #e8dfdb;
  --rule-strong: #d6c9c3;
  --shadow: 0 1px 2px rgba(31, 35, 51, .05), 0 12px 32px -18px rgba(31, 35, 51, .28);
  --radius: 14px;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(64px, 9vw, 120px);
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #14161f;
  --surface: #1b1e2a;
  --surface-2: #20242f;
  --ink: #f3f1ee;
  --ink-soft: #c3c6d2;
  --ink-mute: #9ba0b2;
  --accent: #ff8577;
  --accent-ink: #ff9d92;
  --accent-deep: #ff6f61;
  --secondary: #5cc9bb;
  --rule: #2c3040;
  --rule-strong: #3a3f52;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); line-height: 1.14; }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.3; }

p { margin: 0 0 1rem; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
}

html[data-theme="dark"] .brand-mark { color: #1a1c26; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  border-radius: 8px;
  transition: color .18s ease, background-color .18s ease;
}

.nav a:hover { color: var(--ink); background: var(--surface); }

.nav .nav-cta {
  color: #fff;
  background: var(--accent-deep);
  padding-inline: 16px;
  font-weight: 500;
}
.nav .nav-cta:hover { background: var(--accent-deep); color: #fff; filter: brightness(1.06); }

html[data-theme="dark"] .nav .nav-cta { color: #1a1c26; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); background: var(--surface); }

.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 96px) var(--section-y); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 18px;
}

.hero h1 { margin-bottom: 22px; }

.lede {
  font-size: clamp(1.02rem, 1.3vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.btn-primary { background: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); color: #fff; filter: brightness(1.07); transform: translateY(-1px); }
html[data-theme="dark"] .btn-primary { color: #1a1c26; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--surface); }

.hero-facts {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.hero-facts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}
.hero-facts strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.hero-facts span { color: var(--ink-mute); font-size: .93rem; line-height: 1.55; }

.hero-figure { margin: 0; }

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-figure figcaption {
  margin-top: 12px;
  font-size: .86rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 16 / 11; }
}

/* ---------- Sections communes ---------- */

section { padding-block: var(--section-y); }

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { margin-bottom: 18px; }
.section-intro { color: var(--ink-soft); }

.band { background: var(--surface); border-block: 1px solid var(--rule); }

/* ---------- Cartes formats ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.card-kicker {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin: 0;
}

.card p { color: var(--ink-soft); font-size: .97rem; }

.card-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: .88rem !important;
  color: var(--ink-mute) !important;
}

/* ---------- Méthode ---------- */

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.method-copy h2 { margin-bottom: 22px; }
.method-copy p { color: var(--ink-soft); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding-block: 20px;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
}

.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

@media (max-width: 860px) {
  .method-grid { grid-template-columns: 1fr; }
}

/* ---------- Thèmes ---------- */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}

.theme {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.theme:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); }

.theme img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.theme-body { padding: clamp(18px, 2.2vw, 26px); }
.theme-body h3 { margin-bottom: 10px; }
.theme-body p { color: var(--ink-soft); font-size: .95rem; }

.theme-meta {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: .84rem !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute) !important;
}

.themes-foot {
  margin-top: clamp(28px, 3vw, 40px);
  color: var(--ink-mute);
  font-size: .95rem;
}

/* ---------- Pour qui ---------- */

.audience { background: var(--surface-2); border-block: 1px solid var(--rule); }

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.audience-item h3 {
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.audience-item p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- FAQ ---------- */

.faq-wrap { max-width: 900px; }

.faq-list { border-top: 1px solid var(--rule); }

.faq-list details {
  border-bottom: 1px solid var(--rule);
  padding-block: 4px;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding-block: 14px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  font-weight: 500;
  color: var(--ink);
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .2s ease, background-color .2s ease;
}

.faq-list details[open] summary::after {
  content: '–';
  background: var(--surface);
  transform: rotate(180deg);
}

.faq-list details p {
  color: var(--ink-soft);
  font-size: .97rem;
  padding-bottom: 20px;
  max-width: 66ch;
}

/* ---------- Contact ---------- */

.contact { background: var(--surface); border-top: 1px solid var(--rule); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-copy h2 { margin-bottom: 20px; }
.contact-copy p { color: var(--ink-soft); }

.contact-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--rule-strong);
  padding-top: 22px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  font-size: .95rem;
  align-items: baseline;
}
.contact-list li > span:first-child {
  color: var(--ink-mute);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.placeholder {
  color: var(--ink-mute);
  text-decoration: underline dotted var(--accent);
  text-underline-offset: 4px;
}

.contact-form {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
}

.field { display: grid; gap: 6px; }

.field label {
  font-size: .84rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 46px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-mute); opacity: .8; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.contact-form .btn { justify-self: start; }

.form-status {
  margin: 0;
  font-size: .93rem;
  color: var(--ink-soft);
}
.form-status.is-ok { color: var(--secondary); }
.form-status.is-error { color: var(--accent-deep); }
html[data-theme="dark"] .form-status.is-error { color: var(--accent-ink); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-block: clamp(40px, 5vw, 64px) clamp(64px, 6vw, 80px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px 40px;
  align-items: start;
}

.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand p { color: var(--ink-mute); font-size: .92rem; max-width: 40ch; margin: 0; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: flex-end;
}
.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .93rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--accent-ink); text-decoration: underline; }

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: .84rem;
}

.attribution {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .78rem;
  color: var(--ink-mute);
}
.attribution a { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 3px; }
.attribution a:hover { color: var(--ink-soft); }

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* ---------- Animations (respectent prefers-reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeRise {
    from { opacity: 0; translate: 0 14px; }
    to   { opacity: 1; translate: 0 0; }
  }

  @supports (animation-timeline: view()) {
    .section-head,
    .card,
    .theme,
    .audience-item,
    .steps li,
    .faq-list details {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
