/* Aulonia-Studio : styles communs à toutes les pages du site vitrine
   Identité « aulonia » : papier, encre et un seul soleil. Newsreader pour les titres, Figtree pour le texte. */
@import url("../fonts/fonts.css");

:root {
  /* Palette de l'identité (voir README) */
  --soleil: #f2be45;
  --encre: #1e1c17;
  --papier: #f5f0e4;
  --avoine: #e9e0cc;
  --sauge: #97a77a;
  --argile: #c98a63;
  --lac: #9dbbcb;
  --ecorce: #6b604f;

  /* Rôles, mode clair */
  --bg: var(--papier);
  --surface: var(--avoine);
  --line: #e2d8c3;
  --line-mid: #c9bea7;
  --line-strong: #8f8470;   /* bord des champs : contraste 3:1 sur le papier */
  --ink: var(--encre);
  --muted: var(--ecorce);
  --btn: var(--encre);
  --btn-ink: var(--papier);
  --btn-hover: #3a362d;
  --soleil-hover: #e8b032;
  --field: #fffdf8;
  --danger: #a33a1f;
  --danger-soft: #f7e1d7;
  --danger-ink: #ffffff;
  --ok: #4d5a35;
  --ok-soft: #e4e8d6;
  --band: var(--encre);
  --band-ink: var(--papier);
  /* Illustrations : le trait d'encre et le sol suivent le thème, les couleurs vives restent */
  --ill-encre: var(--encre);
  --ill-sol: var(--avoine);

  --title: "Newsreader", Georgia, "Times New Roman", serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1e1c17; --surface: #2a2620; --line: #36312a; --line-mid: #4a443a; --line-strong: #7a705f;
    --ink: #f5f0e4; --muted: #b3a893;
    --btn: #f5f0e4; --btn-ink: #1e1c17; --btn-hover: #e6ddca;
    --field: #16140f;
    --danger: #f0a08a; --danger-soft: #3a2019; --danger-ink: #1e1c17;
    --ok: #b9c79a; --ok-soft: #2a3020;
    --band: #2a2620; --band-ink: #f5f0e4;
    --ill-encre: #f5f0e4; --ill-sol: #38322a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1c17; --surface: #2a2620; --line: #36312a; --line-mid: #4a443a; --line-strong: #7a705f;
  --ink: #f5f0e4; --muted: #b3a893;
  --btn: #f5f0e4; --btn-ink: #1e1c17; --btn-hover: #e6ddca;
  --field: #16140f;
  --danger: #f0a08a; --danger-soft: #3a2019; --danger-ink: #1e1c17;
  --ok: #b9c79a; --ok-soft: #2a3020;
  --band: #2a2620; --band-ink: #f5f0e4;
  --ill-encre: #f5f0e4; --ill-sol: #38322a;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden;
  font: 16px/1.55 var(--text);
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
::selection { background: var(--soleil); color: var(--encre); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
.ph { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; fill: currentColor; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Logo : le mot suit la couleur du texte, le soleil reste jaune */
.logo { display: block; height: auto; overflow: visible; }
.logo-ink { fill: currentColor; }
.logo-sun { fill: var(--soleil); }
.logo-studio { fill: var(--muted); }

/* Illustrations (aplats, trait d'encre décalé, un seul soleil) */
.ill { display: block; width: 100%; height: auto; }
.i-encre { fill: var(--ill-encre); }
.i-soleil { fill: var(--soleil); }
.i-sauge { fill: var(--sauge); }
.i-argile { fill: var(--argile); }
.i-lac { fill: var(--lac); }
.i-avoine { fill: var(--avoine); }
.i-sol { fill: var(--ill-sol); }
.i-feuille { fill: var(--papier); }
/* Petites icônes : des pastilles claires, en mode sombre aussi. Seul le trait qui sort de la tache s'éclaircit. */
.ill-icon { --ill-encre: var(--encre); }
.ill-icon .i-hors { fill: var(--ink); }

/* En-tête */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { width: min(1184px, 100% - 40px); display: flex; align-items: center; gap: 10px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; color: var(--ink); text-decoration: none; border-radius: 4px; }
.top .logo { width: 184px; }
.nav { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 16px; text-decoration: none;
  text-decoration-color: var(--soleil); text-decoration-thickness: 3px; text-underline-offset: 7px;
}
.nav a:hover { text-decoration-line: underline; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0;
  border: 2px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.icon-btn .ph { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface); border-color: var(--surface); }

/* Boutons et liens */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 21px;
  border: 2px solid transparent; border-radius: 10px; background: none; color: var(--ink);
  font: 600 16px/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-lg { padding: 13px 24px; font-size: 17px; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-sun { background: var(--soleil); color: var(--encre); }
.btn-sun:hover { background: var(--soleil-hover); }
.btn .ph { width: 18px; height: 18px; transition: transform .18s ease; }
.btn:hover .ph { transform: translateX(3px); }
.link-sun {
  display: inline-block; padding: 6px 2px; font-weight: 500; font-size: 17px;
  text-decoration: underline var(--soleil) 3px; text-underline-offset: 7px; transition: text-decoration-thickness .15s ease;
}
.link-sun:hover { text-decoration-thickness: 5px; }

/* Accueil */
.hero { padding: 64px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 32px 48px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(38px, 2.4vw + 28px, 62px); line-height: 1.08; letter-spacing: -.015em; }
/* « gratuits » : un trait de surligneur jaune, posé sous le mot */
.hl {
  background: linear-gradient(var(--soleil), var(--soleil)) 0 .63em / 100% .35em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero p { margin: 26px 0 30px; max-width: 25em; color: var(--muted); font-size: 20px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.hero-art { justify-self: end; width: 100%; max-width: 560px; }

.tools { padding: 0 0 96px; }
.tools > .wrap > h2 { margin: 0 0 36px; font-size: clamp(34px, 1.6vw + 24px, 46px); line-height: 1.1; }
.tool {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center;
  min-height: 352px; padding: 48px; background: var(--surface); border-radius: 28px;
}
.tool h3 { margin: 0 0 16px; font-size: clamp(28px, 1vw + 22px, 35px); line-height: 1.15; }
.tool p { margin: 0 0 26px; max-width: 27em; font-size: 18px; line-height: 1.55; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.tool .url { color: var(--muted); font-size: 15px; }
.tool-art { justify-self: center; width: 122px; }

.soon { margin-top: 36px; }
.soon h3 { margin: 0 0 20px; font-size: 28px; line-height: 1.2; }
.soon ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.soon li { display: flex; align-items: center; gap: 20px; padding: 22px 20px 22px 24px; border: 2px solid var(--line); border-radius: 18px; }
.soon .ill { width: 58px; flex: none; }
.soon b { display: block; margin-bottom: 3px; font-weight: 600; font-size: 18px; line-height: 1.3; }
.soon li span { display: block; color: var(--muted); font-size: 16px; line-height: 1.45; }

.idea { background: var(--band); color: var(--band-ink); }
.idea .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px; padding: 64px 0; }
.idea h2 { margin: 0; font-size: clamp(32px, 1.4vw + 24px, 44px); line-height: 1.1; }
.idea :focus-visible { outline-color: var(--soleil); }

/* Pied de page */
.foot { color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; min-height: 80px; padding: 22px 0; }
.foot .brand { margin-right: 4px; }
.foot .logo { width: 128px; }
.foot a:not(.brand) { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.foot a:not(.brand):hover { color: var(--ink); text-decoration-color: var(--soleil); text-decoration-thickness: 2px; }

/* Formulaires */
button.btn { cursor: pointer; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn[disabled]:hover .ph { transform: none; }
.btn-block { width: 100%; }
.btn-ghost { border-color: var(--line-mid); padding: 10px 16px; font-size: 15px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn-ghost .ph, .btn-danger .ph { transition: none; }
.btn-ghost:hover .ph, .btn-danger:hover .ph { transform: none; }
.btn-small { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn-danger { background: var(--danger); color: var(--danger-ink); }
.btn-danger:hover { filter: brightness(.94); }
.field { display: block; margin: 0 0 16px; }
.field > span:first-child { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 16px;
}
.field input:focus { outline: 3px solid var(--soleil); outline-offset: 1px; border-color: var(--ink); }
.field .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.code-input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .03em; }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-toggle { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.pw-toggle .ph { width: 20px; height: 20px; }
.form-error, .form-ok { margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; font-size: 15px; }
.form-error { background: var(--danger-soft); color: var(--danger); }
.form-ok { background: var(--ok-soft); color: var(--ok); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 20px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }

/* Se connecter, Créer un compte */
.auth { padding: 64px 0 104px; }
.auth .wrap { max-width: 460px; }
.auth-panel { padding: 36px 34px; background: var(--surface); border-radius: 24px; }
.auth h1 { margin: 0 0 24px; font-size: 36px; line-height: 1.1; letter-spacing: -.015em; }
.auth-intro { margin: -10px 0 24px; color: var(--muted); }
.auth-alt { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.auth-alt + .auth-alt { margin-top: 8px; }
.auth-alt a { color: var(--ink); font-weight: 600; text-decoration-color: var(--soleil); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Code de récupération */
.code {
  margin: 0 0 12px; padding: 16px 12px; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--bg);
  font: 600 20px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em;
  text-align: center; user-select: all; overflow-wrap: anywhere;
}
.code-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Mon compte */
.account { padding: 56px 0 104px; }
.account .wrap { max-width: 760px; }
.account-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 24px; padding-bottom: 32px; }
.account-head h1 { margin: 0; font-size: clamp(34px, 2vw + 24px, 46px); line-height: 1.1; letter-spacing: -.015em; overflow-wrap: anywhere; }
.account-head p { margin: 8px 0 0; color: var(--muted); }
.account-sec { padding: 32px 0; border-top: 1px solid var(--line); }
.account-sec h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.account-sec > p { margin: 0 0 18px; color: var(--muted); }
.account-sec > h2 + ul { margin-top: 14px; }
.account-sec form { max-width: 420px; }
.account-sec .code-box { max-width: 420px; }
.devices, .events { list-style: none; margin: 0; padding: 0; }
#btn-autres { margin-top: 16px; }
.devices li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.devices li:first-child, .events li:first-child { border-top: 1px solid var(--line); }
.devices li > .ph { width: 24px; height: 24px; color: var(--muted); }
.devices .meta { flex: 1; min-width: 0; }
.devices b { display: block; font-weight: 600; }
.devices small { color: var(--muted); font-size: 14px; }
.events li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.events time { color: var(--muted); font-size: 14px; }
.events .warn span { color: var(--danger); }
.danger-sec h2 { color: var(--danger); }

/* Pied de page : ligne des pages légales */
.foot .foot-legal { min-height: 0; padding: 0 0 22px; gap: 6px 22px; font-size: 14px; }
.foot .wrap:has(+ .foot-legal) { padding-bottom: 12px; }

/* Pages légales */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { margin: 0; font-size: clamp(34px, 2vw + 24px, 46px); line-height: 1.1; letter-spacing: -.015em; }
.doc .maj { margin: 10px 0 32px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 36px 0 10px; font-size: 26px; line-height: 1.2; }
.doc p, .doc li { line-height: 1.65; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 14px; padding-left: 1.25em; }
.doc li { margin: 5px 0; }
.doc a { text-decoration-color: var(--soleil); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc code { padding: 1px 6px; border-radius: 6px; background: var(--surface); font: 14px ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: nowrap; }
.tableau { margin: 14px 0 18px; overflow-x: auto; border: 1px solid var(--line-mid); border-radius: 14px; }
.tableau table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau th, .tableau td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.tableau th { background: var(--surface); font-weight: 600; }
.tableau td[rowspan] { border-left: 1px solid var(--line); }
.tableau tbody tr:last-child td { border-bottom: 0; }
.auth-legal { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }
.auth-legal a { color: var(--ink); text-decoration-color: var(--soleil); text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 520px; }
  .tool { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding: 36px; }
  .tool-art { width: 96px; }
  .soon ul { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 640px) {
  .top .wrap { min-height: 64px; gap: 8px; }
  .top .logo { width: 150px; }
  .nav { display: none; }
  .hero { padding: 36px 0 64px; }
  .hero p { font-size: 18px; }
  .tools { padding-bottom: 72px; }
  .tool { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 24px 30px; border-radius: 22px; }
  .tool-art { order: -1; justify-self: start; width: 64px; }
  .soon li { padding: 18px 18px 18px 20px; gap: 16px; }
  .soon .ill { width: 48px; }
  .idea .wrap { padding: 48px 0; }
  .auth { padding: 32px 0 64px; }
  .auth-panel { padding: 26px 20px; }
}
