/* Formation Magnétiseur — feuille unique, aucune ressource externe */
:root {
  --fond: #faf6ef;
  --fond-2: #f2ebdf;
  --carte: #fffdf9;
  --texte: #24223b;
  --doux: #5c5872;
  --ligne: #e4dbcc;
  --nuit: #1f1d3d;
  --nuit-2: #2b2853;
  --or: #b8822a;
  --or-clair: #e3bf72;
  --lien: #8a5a12;
  --retenir: #fbf1dc;
  --alerte: #f6e7e4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mesure: 42rem;
  --large: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16152b;
    --fond-2: #1d1c37;
    --carte: #222041;
    --texte: #ece8f5;
    --doux: #b3aec9;
    --ligne: #34315c;
    --lien: #e8c47d;
    --retenir: #2a2747;
    --alerte: #34243a;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 1.0625rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lien); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.85rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.22rem; margin: 1.8em 0 .4em; }
p, ul, ol, table { margin: 0 0 1.1em; }
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--nuit); color: #fff; padding: .6em 1em; z-index: 10; }
.lien-evitement:focus { left: 1rem; }
.conteneur { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 1rem; }
.mesure { max-width: var(--mesure); }

/* En-tête */
.entete { background: var(--nuit); color: #f3eedf; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.marque { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.marque img { width: 2.6rem; height: 2.6rem; }
.marque-nom { font-family: var(--serif); font-size: 1.22rem; font-weight: 700; line-height: 1.1; display: block; }
.marque-sig { font-size: .78rem; color: var(--or-clair); letter-spacing: .04em; display: block; }
.nav { display: flex; gap: .2rem 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: #e9e4d6; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--or-clair); color: #fff; }

/* Héros d'accueil */
.heros { background: radial-gradient(120% 140% at 85% 0%, var(--nuit-2) 0%, var(--nuit) 60%); color: #f3eedf; padding: 3.5rem 0 4rem; overflow: hidden; }
.heros-grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.heros h1 { color: #fff; margin-top: 0; }
.heros p.chapeau { font-size: 1.16rem; color: #ddd7c7; max-width: 36rem; }
.heros-visuel { border-radius: 1.2rem; overflow: hidden; box-shadow: 0 1.5rem 3rem rgba(0,0,0,.35); aspect-ratio: 4 / 3; background: var(--nuit-2); }
.heros-visuel img { width: 100%; height: 100%; object-fit: cover; }
.boutons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.bouton { display: inline-block; padding: .78rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none; line-height: 1.2; border: 2px solid transparent; }
.bouton-or { background: var(--or-clair); color: #1f1d3d; }
.bouton-or:hover { background: #f0d394; }
.bouton-ligne { border-color: rgba(243,238,223,.55); color: #f3eedf; }
.bouton-ligne:hover { border-color: #fff; color: #fff; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--fond-2); }
.section h2:first-child { margin-top: 0; }
.sur-titre-clair { color: var(--or-clair) !important; }
.apres-cartes { margin-top: 2rem; }
.lettre .consent a { color: inherit; }
.bouton-or, .bouton-or:visited { color: #1f1d3d; }
.chapeau { font-size: 1.12rem; color: var(--doux); }
.sur-titre { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--or); font-weight: 700; margin-bottom: .3rem; }
.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: etape; padding: 0; list-style: none; }
.etapes li { background: var(--carte); border: 1px solid var(--ligne); border-radius: .9rem; padding: 1.2rem 1.1rem; counter-increment: etape; }
.etapes li::before { content: counter(etape); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--nuit); color: var(--or-clair); font-family: var(--serif); font-weight: 700; margin-bottom: .6rem; }
.etapes strong { display: block; font-family: var(--serif); font-size: 1.08rem; margin-bottom: .3rem; }
.etapes p { margin: 0; color: var(--doux); font-size: .97rem; }

/* Cartes d'articles */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1.3rem; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: .9rem; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.carte:hover { transform: translateY(-2px); box-shadow: 0 .8rem 1.6rem rgba(31,29,61,.12); }
.carte-img { aspect-ratio: 16 / 9; background: var(--nuit-2); overflow: hidden; }
.carte-img img { width: 100%; height: 100%; object-fit: cover; }
.carte-corps { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.carte-rub { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--or); font-weight: 700; }
.carte h3 { margin: 0; font-size: 1.15rem; }
.carte h3 a { color: var(--texte); text-decoration: none; }
.carte h3 a::after { content: ""; position: absolute; inset: 0; }
.carte { position: relative; }
.carte p { margin: 0; color: var(--doux); font-size: .95rem; }
.carte-meta { margin-top: auto !important; font-size: .83rem !important; padding-top: .4rem; }

/* Engagements */
.engagements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; padding: 0; list-style: none; }
.engagements li { padding-left: 2rem; position: relative; }
.engagements li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--or-clair); box-shadow: inset 0 0 0 4px var(--carte); border: 1px solid var(--or); }

/* Lettre */
.lettre { background: var(--nuit); color: #efe9da; border-radius: 1.2rem; padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; align-items: center; }
.lettre h2 { color: #fff; margin: 0 0 .4rem; }
.lettre p { margin: 0; color: #d6d0bf; }
.lettre form { display: grid; gap: .7rem; }
.lettre label.champ { font-size: .9rem; color: #efe9da; }
.lettre input[type=email] { width: 100%; padding: .8rem 1rem; border-radius: .6rem; border: 1px solid #4a4680; background: #fff; color: #1f1d3d; font: inherit; }
.lettre .consent { font-size: .82rem; color: #c9c3b1; display: flex; gap: .5rem; align-items: flex-start; }
.lettre .consent input { margin-top: .3rem; }
.lettre button { justify-self: start; cursor: pointer; font: inherit; }
.piege { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.message-form { font-size: .92rem; min-height: 1.2em; margin: 0; }

/* Article */
.fil { font-size: .88rem; color: var(--doux); margin: 1.6rem 0 .2rem; }
.fil a { color: var(--doux); }
.fil span[aria-hidden] { margin: 0 .35rem; }
.article-entete { padding-bottom: 1rem; }
.article-meta { color: var(--doux); font-size: .92rem; display: flex; gap: .4rem 1.2rem; flex-wrap: wrap; }
.couverture { margin: 1.4rem 0 2rem; border-radius: 1rem; overflow: hidden; aspect-ratio: 16 / 8; background: var(--nuit-2); }
.couverture img { width: 100%; height: 100%; object-fit: cover; }
.article-grille { display: grid; grid-template-columns: minmax(0, var(--mesure)) 16rem; gap: 3rem; justify-content: space-between; align-items: start; }
.sommaire { position: sticky; top: 1.2rem; font-size: .9rem; border-left: 2px solid var(--ligne); padding-left: 1rem; }
.sommaire p { font-weight: 700; margin-bottom: .4rem; font-family: var(--serif); font-size: 1rem; }
.sommaire ol { padding-left: 1.1rem; margin: 0; }
.sommaire li { margin-bottom: .35rem; }
.sommaire a { color: var(--doux); text-decoration: none; }
.sommaire a:hover { color: var(--lien); text-decoration: underline; }
.contenu > h2:first-child { margin-top: 0; }
.contenu ul, .contenu ol { padding-left: 1.3rem; }
.contenu li { margin-bottom: .35em; }
.contenu table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.contenu th, .contenu td { border: 1px solid var(--ligne); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.contenu th { background: var(--fond-2); }
.retenir { background: var(--retenir); border-left: 4px solid var(--or); border-radius: .5rem; padding: 1rem 1.2rem; margin: 1.6rem 0; }
.retenir-titre { font-family: var(--serif); font-weight: 700; margin: 0 0 .3rem !important; color: var(--or); }
.retenir p:last-child { margin-bottom: 0; }
.avertissement { background: var(--alerte); border-radius: .6rem; padding: .9rem 1.1rem; font-size: .92rem; margin: 2rem 0; }
.faq h3 { font-size: 1.1rem; }
.sources { font-size: .88rem; color: var(--doux); }
.sources ul { padding-left: 1.1rem; }
.sources a { color: var(--doux); word-break: break-word; }
.suite { border-top: 1px solid var(--ligne); margin-top: 3rem; padding-top: 2rem; }
.page-texte { padding-bottom: 3rem; }

/* Pied */
.pied { background: var(--nuit); color: #cfc9b8; padding: 2.5rem 0 2rem; margin-top: 3rem; font-size: .92rem; }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.pied a { color: #ece6d4; }
.pied h2 { font-size: 1rem; color: #fff; margin: 0 0 .6rem; font-family: var(--serif); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .35rem; }
.pied-bas { border-top: 1px solid #38356a; margin-top: 2rem; padding-top: 1rem; font-size: .82rem; color: #a9a392; }

@media (max-width: 960px) {
  .article-grille { grid-template-columns: 1fr; }
  .sommaire { position: static; border-left: 0; padding: 1rem 1.1rem; background: var(--fond-2); border-radius: .7rem; order: -1; }
  .etapes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .heros { padding: 2.2rem 0 2.6rem; }
  .heros-grille, .lettre, .pied-grille, .engagements { grid-template-columns: 1fr; }
  .heros-visuel { order: -1; aspect-ratio: 16 / 9; }
  .etapes { grid-template-columns: 1fr; }
  .nav { width: 100%; gap: .1rem 1rem; }
  .lettre { padding: 1.4rem; }
  .couverture { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) { .carte { transition: none; } .carte:hover { transform: none; } }
@media print { .entete, .pied, .lettre, .sommaire { display: none; } body { background: #fff; color: #000; } }
