/* ============================================================
   components.css — éléments réutilisables.
   ============================================================ */

/* ---------- surtitre ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background: var(--orange);
}

/* ---------- boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;              /* cible tactile WCAG 2.5.8 */
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s, background .2s,
    border-color .2s, color .2s;
}

.btn-primary {
  background: linear-gradient(100deg, var(--orange), var(--amber));
  color: #14161A;                /* 6.5:1 sur l'orange */
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -12px rgb(255 106 0 / 75%);
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--amber);
}

.btn[aria-busy="true"] {
  opacity: .6;
  pointer-events: none;
}

/* ---------- sélecteur de langue ---------- */
.lang {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.lang a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;                  /* cible tactile */
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  opacity: .45;
  transition: opacity .2s, border-color .2s;
}

.lang a:hover { opacity: .85; }

.lang a[aria-current="true"] {
  opacity: 1;
  border-color: var(--orange);
}

.lang svg {
  width: 26px;
  height: 18px;
  border-radius: 2px;
}

/* ---------- navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
  transition: color .2s;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

/* `.nav a` est plus spécifique que `.btn` : on rétablit le style du bouton. */
.nav .btn {
  padding: 11px 22px;
  color: #14161A;
}

.nav .btn:hover { color: #14161A; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: none;
  border: 0;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
  transition: transform .25s var(--ease), opacity .2s;
}

.hdr.is-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hdr.is-open .burger span:nth-child(2) { opacity: 0; }
.hdr.is-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (width <= 720px) {
  .burger { display: block; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 18px;
    background: #12141A;
    border-bottom: 1px solid var(--line);
  }

  .nav[hidden] { display: none; }

  .nav a       { padding: 14px var(--pad); font-size: 15.5px; }
  .nav .btn    { margin: 10px var(--pad) 0; }
}

/* ---------- héros ---------- */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Assez visible pour rester un motif, assez discret pour que le texte
     du héros conserve son contraste (WCAG 1.4.3). */
  opacity: .5;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 45%, #000 35%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 45%, #000 35%, transparent 100%);
}

.hero-logo {
  width: min(560px, 92vw);
  height: auto;
  aspect-ratio: 760 / 390;
  margin: 0 0 34px;
  object-fit: contain;
}

.hero h1 {
  font-size: clamp(2.05rem, 4.7vw, 3.5rem);
  font-weight: 800;
  max-width: 17ch;
}

.hero .kicker {
  margin: 22px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 1.3vw, 13px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
}

.hero .lede {
  max-width: 66ch;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.hero .lede p { margin: 0 0 15px; }
.hero .lede p:last-child { margin-bottom: 0; }

.slogan {
  max-width: 34ch;
  margin: 34px 0 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--orange);
  font-family: var(--font-head);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--text);
}

/* ---------- cartes ---------- */
.card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 32px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}

.card:hover {
  border-color: rgb(255 106 0 / 45%);
  transform: translateY(-3px);
  background: var(--ink-3);
}

.card > svg { margin-bottom: 22px; }

.card h3 {
  font-size: 1.24rem;
  font-variation-settings: "wdth" 112;
}

.card p {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.card ul {
  margin: 0;
  padding: 15px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.card li {
  position: relative;
  margin-bottom: 7px;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-3);
}

.card li:last-child { margin-bottom: 0; }

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 7px;
  height: 1px;
  background: var(--orange);
}

/* ---------- formats de formation ---------- */
.fmt {
  padding: 30px 28px;
  border-right: 1px solid var(--line);
}

.fmt:last-child { border-right: 0; }

.fmt h3 {
  font-size: 1.08rem;
  font-variation-settings: "wdth" 110;
}

.fmt p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.fmt .tag {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
}

@media (width <= 960px) {
  .fmt { border-right: 0; border-bottom: 1px solid var(--line); }
  .fmt:last-child { border-bottom: 0; }
}

/* ---------- étapes de la méthode ---------- */
.steps::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 14px;
  background: url("../img/wave-divider.svg") repeat-x center;
}

.step .n {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--orange);
}

.step h3 {
  font-size: 1.05rem;
  font-variation-settings: "wdth" 110;
}

.step p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- coordonnées ---------- */
.coord {
  margin: 0;
  padding: 0;
  list-style: none;
}

.coord li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.coord li:first-child { padding-top: 0; }

.coord .k {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.coord .v {
  font-size: 16px;
  font-style: normal;   /* <address> est italique par défaut */
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
}

a.v:hover { color: var(--amber); }

/* ---------- formulaire ---------- */
.contact-form {
  padding: clamp(24px, 3.4vw, 34px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.field .req { color: var(--orange); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }

.field select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #8C9098 50%),
    linear-gradient(135deg, #8C9098 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field select option { background: var(--ink-2); color: var(--text); }

.field textarea {
  resize: vertical;
  min-height: 118px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.field [aria-invalid="true"] { border-color: var(--amber); }

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (width <= 720px) {
  .two { grid-template-columns: 1fr; }
}

/* Consentement RGPD */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 4px 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.consent input[type="checkbox"] {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.consent a { color: var(--amber); }

.contact-form .btn { width: 100%; margin-top: 6px; }

.formnote {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  min-height: 1.5em;             /* évite le saut de mise en page */
}

.formnote[data-state="error"] { color: var(--amber); }
.formnote[data-state="ok"]    { color: var(--text-2); }

/* Piège à robots — masqué visuellement et pour les lecteurs d'écran */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- pied de page ---------- */
.foot .mark { width: 88px; height: auto; }

.foot .legal {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.foot nav a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}

.foot nav a:hover { color: var(--amber); }

/* ---------- animation d'apparition ----------
   Le masquage est conditionné à la classe `.js` posée par boot.js :
   sans JavaScript — ou si le script échoue — le contenu reste visible. */
.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.js .rv.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; }
}
