/* EddyFlix — site de présentation (statique, sans traceur ni police externe) */
@font-face {
  font-family: "Comfortaa";
  src: url("fonts/comfortaa-bold.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}
:root {
  --bg: #0E1116; --bg2: #151A22; --card: #1A1F27; --line: #2A313C;
  --text: #EEF1F5; --dim: #A7B0BE; --violet: #8E5CF0; --violet-l: #B392FF; --pink: #FF4F9A;
  --radius: 16px; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet-l); text-underline-offset: 3px; }
a:hover { color: var(--pink); }
h1, h2, h3 { font-family: "Comfortaa", system-ui, sans-serif; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.2vw, 34px); margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.dim { color: var(--dim); }
.accent { color: var(--pink); }

/* ---- en-tête ---- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(14,17,22,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
.top .brand img { height: 40px; width: auto; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.top nav a { color: var(--dim); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.top nav a.bug { color: var(--pink); }

/* ---- boutons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn.primary { background: var(--pink); color: #12060C; }
.btn.primary:hover { background: #FF73B0; color: #12060C; }
.btn.ghost { border-color: var(--violet); color: var(--text); }
.btn.ghost:hover { background: rgba(142,92,240,.15); color: var(--text); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---- héros ---- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .logo { width: min(520px, 86%); margin: 0 auto 28px; }
.hero p.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--dim); max-width: 760px; margin: 0 auto 24px; }
.hero .btns { justify-content: center; }
.shot { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.hero .shot { margin: 48px auto 0; }

/* ---- sections ---- */
section { padding: 56px 0; }
section.alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feature img { border-bottom: 1px solid var(--line); }
.feature .txt { padding: 18px 20px 20px; }
.feature p { color: var(--dim); margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* ---- schéma ---- */
.arch { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.box h3 { font-size: 18px; }
.box ul { margin: 0; padding-left: 18px; color: var(--dim); font-size: 15px; }
.box.v { border-color: var(--violet); }
.box.p { border-color: var(--pink); }

/* ---- documentation ---- */
.doc { display: flex; flex-wrap: wrap; gap: 40px; padding: 40px 0 64px; }
.doc aside { flex: 1 1 220px; max-width: 260px; }
.doc aside ol { position: sticky; top: 92px; margin: 0; padding: 16px 16px 16px 36px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.doc aside li { margin: 4px 0; }
.doc aside a { color: var(--dim); text-decoration: none; }
.doc aside a:hover { color: var(--text); }
.doc article { flex: 999 1 560px; min-width: 0; }
.doc article h2 { margin-top: 48px; padding-top: 8px; }
.doc article h2:first-of-type { margin-top: 0; }
.doc article h3 { margin-top: 28px; }
pre { background: #0A0D12; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: .92em; }
:not(pre) > code { background: #232A35; padding: 2px 6px; border-radius: 6px; }
.table { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; }
.note { background: rgba(142,92,240,.12); border: 1px solid rgba(142,92,240,.5); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.warn { background: rgba(255,79,154,.10); border: 1px solid rgba(255,79,154,.5); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.note p:last-child, .warn p:last-child { margin: 0; }
kbd { display: inline-block; min-width: 1.6em; text-align: center; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 3px; background: #232A35; font: 600 14px/1.5 system-ui, sans-serif; }
figure { margin: 0 0 22px; }
figcaption { color: var(--dim); font-size: 14px; margin-top: 8px; }

/* ---- FAQ ---- */
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
details > *:last-child { margin-bottom: 16px; }

/* ---- pied ---- */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer img { height: 28px; width: auto; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-left: auto; }
footer a { color: var(--dim); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { margin-left: 0; width: 100%; }
  .hero { padding-top: 36px; }
  .doc aside { max-width: none; }
  .doc aside ol { position: static; }
}

/* ---- bouton thème clair / sombre ---- */
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.theme-btn:hover { border-color: var(--violet); color: var(--violet-l); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .sun { display: none; }
html[data-theme="light"] .theme-btn .sun { display: block; }
html[data-theme="light"] .theme-btn .moon { display: none; }

/* ---- thème clair (le thème sombre reste celui par défaut) ---- */
html[data-theme="light"] {
  --bg: #F6F7FB; --bg2: #ECEFF6; --card: #FFFFFF; --line: #D8DDE6;
  --text: #151922; --dim: #525C6C; --violet-l: #6A3FD8; --pink: #E0337E;
  color-scheme: light;
}
html[data-theme="light"] .top { background: rgba(246,247,251,.92); }
html[data-theme="light"] .shot { box-shadow: 0 20px 50px rgba(20,25,35,.18); }
html[data-theme="light"] pre { background: #EEF1F6; }
html[data-theme="light"] :not(pre) > code { background: #E7EAF1; }
html[data-theme="light"] kbd { background: #FFFFFF; }
html[data-theme="light"] .btn.primary { color: #FFFFFF; }
html[data-theme="light"] .btn.primary:hover { background: #C42468; color: #FFFFFF; }
html[data-theme="light"] .note { background: rgba(142,92,240,.08); }
html[data-theme="light"] .warn { background: rgba(224,51,126,.07); }
