/* ============================================================
   RESTINNER — DESIGN SYSTEM · "Calm Mind"
   Source unique des tokens et composants.
   Palette et typo extraites de lanp.restinner.com.
   Règle : aucun style en dur dans une page, tout passe par ici.
   ============================================================ */

/* -------------------- TOKENS -------------------- */
:root {
  /* Surfaces */
  --bg:           #f2f6f8;
  --bg-cream:     #f4efe8;
  --bg-green:     #edf1df;
  --surface:      #ffffff;
  --surface-soft: #fafbfc;
  --border:       rgba(31, 41, 55, .10);
  --border-warm:  rgba(166, 139, 106, .32);

  /* Texte */
  --heading:  #111827;
  --text:     #1f2937;
  --muted:    #4b5563;
  --faint:    #6b7280;

  /* Marque — vert sauge profond (accent unique) */
  --brand:        #2c6e49;
  --brand-deep:   #1e5c38;
  --brand-soft:   #e2ebd5;
  --brand-tint:   rgba(44, 110, 73, .08);
  --on-brand:     #ffffff;

  /* Accents chauds (décor, jamais CTA) */
  --sand:   #a68b6a;
  --sand-deep: #8d765c;
  --blush:  #f7dfdc;

  /* Statuts */
  --success: #4caf50;  --success-bg: #eaffeb;
  --danger:  #d32f2f;  --danger-bg:  #fdecec;
  --warning: #b7791f;  --warning-bg: #fdf3dc;
  --info:    #2b6cb0;  --info-bg:    #e8f1fb;

  /* Typographie */
  --font-heading: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, sans-serif;

  --fs-xs: 13px; --fs-sm: 14.5px; --fs-base: 17.6px; --fs-lg: 20px;
  --fs-h3: 23px; --fs-h2: clamp(28px, 4vw, 40px); --fs-h1: clamp(34px, 5.5vw, 56px);

  /* Espacements */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;

  /* Formes */
  --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;

  /* Élévation */
  --shadow-soft: 0 4px 20px rgba(47, 47, 47, .05);
  --shadow-btn:  0 4px 12px rgba(47, 47, 47, .10);
  --shadow-lift: 0 14px 40px rgba(47, 47, 47, .10);

  --maxw: 1160px;
  --maxw-prose: 700px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* -------------------- BASE -------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading); font-weight: 700; color: var(--heading);
  line-height: 1.15; letter-spacing: -.01em; margin: 0 0 var(--s4);
}
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); } h4 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s4); color: var(--muted); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.section { padding: var(--s8) 0; }
.section--cream { background: var(--bg-cream); }
.section--green { background: var(--bg-green); }

.kicker {
  font-family: var(--font-heading); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sand-deep);
  display: block; margin-bottom: var(--s3);
}

/* -------------------- BOUTONS -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-sm);
  padding: 14px 28px; border-radius: var(--r-pill); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-btn); }
.btn--primary:hover { background: var(--brand-deep); color: var(--on-brand); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn--primary:active { transform: translateY(0); }
.btn--secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn--secondary:hover { background: var(--brand-tint); color: var(--brand-deep); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand-deep); }
.btn--sm { padding: 10px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 18px 36px; font-size: var(--fs-base); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; pointer-events: none; }

/* -------------------- BADGES & TAGS -------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--brand-soft); color: var(--brand-deep);
}
.badge--sand { background: var(--bg-cream); color: var(--sand-deep); border: 1px solid var(--border-warm); }
.badge--blush { background: var(--blush); color: #8a4b45; }
.badge--outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.tag { font-size: var(--fs-xs); color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 4px 12px; border-radius: var(--r-pill); text-decoration: none; }
.tag:hover { border-color: var(--brand); color: var(--brand); }

/* -------------------- CARTES -------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-soft); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--bg-green), var(--bg-cream)); display: grid; place-items: center; color: var(--sand); font-family: var(--font-heading); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.card__body { padding: var(--s5); }
.card__meta { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-xs); color: var(--faint); margin-bottom: var(--s3); }
.card__title { font-size: 21px; margin-bottom: var(--s2); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--brand); }
.card__excerpt { font-size: var(--fs-sm); margin: 0; }

.grid { display: grid; gap: var(--s5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* -------------------- HEADER & FOOTER -------------------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(242, 246, 248, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s5); }
.logo { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--heading); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); font-weight: 400; }
.nav { display: flex; gap: var(--s5); align-items: center; }
.nav a:not(.btn) { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); color: var(--text); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

.site-footer { background: var(--heading); color: #d1d5db; padding: var(--s8) 0 var(--s6); }
.site-footer a { color: #d1d5db; text-decoration: none; } .site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .1em; }
.site-footer p { color: #9ca3af; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s6); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.footer-bottom { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-xs); color: #9ca3af; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* -------------------- FORMULAIRES -------------------- */
.field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.field label { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); color: var(--heading); }
.input {
  font: inherit; font-size: var(--fs-sm); color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--sand); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.input.is-error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(211, 47, 47, .08); }
.field__hint { font-size: var(--fs-xs); color: var(--faint); }
.field__error { font-size: var(--fs-xs); color: var(--danger); font-weight: 700; }

.newsletter { background: var(--bg-green); border-radius: var(--r-lg); padding: clamp(24px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s6); align-items: center; }
.newsletter form { display: flex; gap: var(--s3); flex-wrap: wrap; }
.newsletter .input { flex: 1 1 220px; }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } }

/* -------------------- ÉDITORIAL -------------------- */
.prose { max-width: var(--maxw-prose); margin: 0 auto; }
.prose h2 { margin-top: var(--s7); } .prose h3 { margin-top: var(--s6); }
.prose p, .prose li { color: var(--text); font-size: var(--fs-base); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: var(--s2); }
.prose blockquote { margin: var(--s6) 0; padding: var(--s2) 0 var(--s2) var(--s5); border-left: 4px solid var(--sand); font-family: var(--font-heading); font-size: 22px; line-height: 1.4; color: var(--heading); }
.prose img { border-radius: var(--r-md); margin: var(--s5) 0; }

.callout { display: flex; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: var(--r-md); border: 1px solid transparent; margin: var(--s5) 0; font-size: var(--fs-sm); }
.callout p { margin: 0; color: inherit; }
.callout strong { font-family: var(--font-heading); display: block; margin-bottom: 2px; }
.callout--note    { background: var(--bg-green);    border-color: rgba(44,110,73,.2);  color: var(--brand-deep); }
.callout--tip     { background: var(--info-bg);     border-color: rgba(43,108,176,.2); color: #1e4f85; }
.callout--warn    { background: var(--warning-bg);  border-color: rgba(183,121,31,.25); color: #7a5112; }
.callout--danger  { background: var(--danger-bg);   border-color: rgba(211,47,47,.2);  color: #9b1c1c; }

.tldr { background: var(--surface); border: 1px solid var(--border-warm); border-left: 6px solid var(--brand); border-radius: var(--r-md); padding: var(--s5); box-shadow: var(--shadow-soft); }
.tldr h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: var(--s3); }
.tldr ul { margin: 0; padding-left: 1.2em; } .tldr li { color: var(--text); margin-bottom: 6px; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 var(--s5); margin-bottom: var(--s3); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-heading); font-weight: 700; color: var(--heading); padding: var(--s4) 0; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--brand); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s4); margin: 0; }

.author { display: flex; gap: var(--s4); align-items: center; background: var(--bg-cream); border-radius: var(--r-md); padding: var(--s5); }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 800; font-size: 22px; }
.author p { margin: 0; font-size: var(--fs-sm); } .author strong { font-family: var(--font-heading); color: var(--heading); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--fs-xs); color: var(--faint); list-style: none; padding: 0; margin: 0 0 var(--s4); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s2); color: var(--sand); }
.breadcrumb a { color: var(--muted); }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s5); font-size: var(--fs-sm); }
.toc ol { margin: 0; padding-left: 1.2em; } .toc li { margin-bottom: 6px; }

/* -------------------- CTA LIVRE & MONÉTISATION -------------------- */
.book-cta { display: grid; grid-template-columns: 220px 1fr; gap: var(--s6); align-items: center; background: var(--surface); border: 1px solid var(--border-warm); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow-soft); }
.book-cta__cover { aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px; background: linear-gradient(160deg, #dbe7ef, var(--bg-cream)); box-shadow: -6px 8px 24px rgba(47,47,47,.18); display: grid; place-items: center; text-align: center; font-family: var(--font-heading); font-weight: 800; color: var(--heading); padding: var(--s4); }
.book-cta__cover b { color: var(--danger); display: block; font-size: 28px; }
.price { font-family: var(--font-heading); font-weight: 800; color: var(--heading); }
.fineprint { font-size: var(--fs-xs); color: var(--faint); }
@media (max-width: 680px) { .book-cta { grid-template-columns: 1fr; } .book-cta__cover { max-width: 180px; } }

.ad { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--surface-soft), var(--surface-soft) 10px, #f1f4f6 10px, #f1f4f6 20px); border: 1px dashed var(--border-warm); border-radius: var(--r-sm); color: var(--faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ad--leaderboard { min-height: 90px; } .ad--rectangle { min-height: 250px; }

.consent { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lift); padding: var(--s5); display: flex; gap: var(--s5); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent p { margin: 0; font-size: var(--fs-sm); flex: 1 1 320px; }
.consent__actions { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* -------------------- ÉTATS -------------------- */
.skeleton { background: linear-gradient(90deg, #e8edf0 25%, #f4f7f8 50%, #e8edf0 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: var(--s7) var(--s5); background: var(--surface); border: 1px dashed var(--border-warm); border-radius: var(--r-md); }
.toast { display: inline-flex; gap: var(--s3); align-items: center; background: var(--heading); color: #fff; padding: 12px 20px; border-radius: var(--r-pill); font-size: var(--fs-sm); box-shadow: var(--shadow-lift); }

.pagination { display: flex; gap: var(--s2); }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-pill); font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Logo image (header) */
.logo img { height: 56px; width: auto; display: block; }
