/* ─── Alexandre Rodenas — feuille de style du site ─────────────── */

:root {
  --paper: #f6f4ef;
  --surface: #fdfcf9;
  --ink: #1b1b19;
  --ink-soft: #3d3c38;
  --muted: #6e6b64;
  --line: #e3dfd5;
  --line-strong: #cfc9bb;
  --accent: #2f5b4c;
  --accent-soft: #e5ece8;
  --ok: #3f8a5f;
  --danger: #a5392c;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --wrap: 1080px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121311;
    --surface: #1a1b19;
    --ink: #eeece6;
    --ink-soft: #cfccc4;
    --muted: #918e86;
    --line: #2a2b28;
    --line-strong: #3a3b37;
    --accent: #8fbfa9;
    --accent-soft: #1f2a25;
    --ok: #6cc08e;
    --danger: #e0806f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121311;
  --surface: #1a1b19;
  --ink: #eeece6;
  --ink-soft: #cfccc4;
  --muted: #918e86;
  --line: #2a2b28;
  --line-strong: #3a3b37;
  --accent: #8fbfa9;
  --accent-soft: #1f2a25;
  --ok: #6cc08e;
  --danger: #e0806f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.hidden { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ─── Navigation ─── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; font-size: 0.875rem; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.lang button {
  font: 500 0.75rem/1 var(--sans); letter-spacing: .06em;
  background: none; border: 0; color: var(--muted);
  padding: 7px 10px; cursor: pointer;
}
.lang button.active { background: var(--ink); color: var(--paper); }
.icon-link { color: var(--muted); display: inline-flex; transition: color .2s; }
.icon-link:hover { color: var(--ink); }
.icon { width: 18px; height: 18px; flex: none; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ─── Typographie ─── */
.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
h1, h2, h3 { font-weight: 400; margin: 0; }
.display { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em; }
.display em { font-style: italic; color: var(--accent); }
.section-title { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -0.01em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 620px; }
.muted { color: var(--muted); }

/* ─── Sections ─── */
section { padding: 96px 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding: 112px 0 96px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { margin: 12px 0 0; color: var(--muted); max-width: 520px; }
@media (max-width: 640px) { section { padding: 64px 0; } section.hero { padding: 72px 0 64px; } }

/* ─── Hero ─── */
.hero .lead { margin: 28px 0 40px; }
.hero-meta { display: flex; gap: 40px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-meta div { font-size: 0.875rem; color: var(--muted); }
.hero-meta strong { display: block; color: var(--ink); font-weight: 500; font-size: 0.95rem; }

/* ─── Boutons ─── */
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 0.9rem/1 var(--sans); text-decoration: none;
  padding: 13px 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink); background: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-small { padding: 9px 14px; font-size: 0.8rem; }

/* ─── Projets phares ─── */
.feature {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center;
  padding: 56px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.reverse .feature-visual { order: 2; }
.feature-visual {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden;
}
.feature-visual img { width: 42%; max-width: 200px; border-radius: 22%; box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); }
.feature-visual .tag {
  position: absolute; top: 16px; left: 16px;
  font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.feature-num { font-family: var(--serif); font-size: 1.1rem; color: var(--muted); }
.feature h3 { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; margin: 6px 0 16px; }
.feature .tagline { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 24px; }
.points { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.points li { padding-left: 22px; position: relative; color: var(--ink-soft); font-size: 0.95rem; }
.points li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-size: 0.75rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
}
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .feature.reverse .feature-visual { order: 0; }
}

/* ─── Grilles de cartes ─── */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; transition: border-color .2s, transform .2s;
}
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h4 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; }
.card-foot a, .card-foot span { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card-foot a:hover { color: var(--ink); }
.version { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.arrow { color: var(--muted); transition: transform .2s, color .2s; }
a.card:hover .arrow { transform: translateX(3px); color: var(--accent); }

/* ─── Applications Android (APK) ─── */
.apk-list { display: grid; gap: 20px; }
.apk {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.apk-icon { width: 88px; height: 88px; border-radius: 22px; border: 1px solid var(--line); background: var(--paper); }
.apk h4 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 600; }
.apk p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; max-width: 560px; }
.apk-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8rem; color: var(--muted); }
.apk-meta b { color: var(--ink-soft); font-weight: 500; }
.apk-cta { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.apk.placeholder { border-style: dashed; background: transparent; }
.apk.placeholder .apk-icon { display: grid; place-items: center; color: var(--line-strong); font-size: 2rem; border-style: dashed; }
.apk.placeholder .btn { opacity: .5; pointer-events: none; }
@media (max-width: 720px) {
  .apk { grid-template-columns: 64px 1fr; gap: 18px; padding: 22px; }
  .apk-icon { width: 64px; height: 64px; border-radius: 16px; }
  .apk-cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
.install {
  margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  counter-reset: step;
}
.install div { border-top: 1px solid var(--line-strong); padding-top: 16px; font-size: 0.9rem; color: var(--muted); }
.install div::before {
  counter-increment: step; content: '0' counter(step);
  display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin-bottom: 6px;
}
@media (max-width: 720px) { .install { grid-template-columns: 1fr; } }

/* ─── Statut en direct (MCP) ─── */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot.off { background: var(--danger); }
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--paper) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.fade-in { animation: fade-in .4s ease-out both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Expertise ─── */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.skills h4 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; }
.skills p { margin: 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 820px) { .skills { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .skills { grid-template-columns: 1fr; } }

/* ─── Contact & pied de page ─── */
.contact { text-align: center; }
.contact .section-title { max-width: 720px; margin: 0 auto 32px; }
.contact .actions { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.8rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ─── Page ressources ─── */
.prose { max-width: 760px; }
.prose h2 { font-family: var(--serif); font-size: 2rem; margin: 56px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 0.75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 32px 0 10px; }
.prose h4 { font-size: 1rem; font-weight: 600; margin: 22px 0 8px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose li { color: var(--ink-soft); }
.prose li::marker { color: var(--line-strong); }
.prose a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); color: var(--accent); }
.prose section { padding: 0; border: 0; }

/* ─── Projet phare : La Clinique du Code ─── */
.feature.flagship .feature-num { color: var(--accent); }
.feature > * { min-width: 0; }
.feature code, .clinic-team code { font-family: var(--mono); font-size: 0.85em; }
.clinic-visual { padding: 56px 28px 28px; }
.clinic-team { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 380px; display: grid; gap: 10px; }
.clinic-team li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  font-size: 0.85rem; color: var(--ink-soft);
}
.clinic-team code { color: var(--muted); }
.clinic-team .mode {
  font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.clinic-team li.operates { border-color: var(--accent); }
.clinic-team li.operates .mode { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.install-cmd {
  margin: 0 0 28px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink-soft); font-size: 0.78rem; line-height: 1.7;
  overflow-x: auto; white-space: pre;
}
@media (max-width: 820px) { .clinic-visual { aspect-ratio: auto; } }
@media (max-width: 420px) { .clinic-team li { grid-template-columns: 1fr auto; } .clinic-team code { display: none; } }

/* ─── Navigation entre sections ─── */
.nav-links a.current { color: var(--ink); }
.nav-links a.current::after { content: ''; display: block; height: 1px; background: var(--accent); margin-top: 2px; }
@media (max-width: 820px) {
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 10px; row-gap: 8px; }
  .nav-links { display: flex; order: 3; width: 100%; gap: 20px; overflow-x: auto; }
}

/* ─── Cartes vers les sections ─── */
.sections-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.sections-grid .card h4 { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.sections-grid .card .muted { font-size: 0.8rem; }
@media (max-width: 820px) { .sections-grid { grid-template-columns: 1fr; } }

/* ─── Visuels « liste » (broker, tableau des départs) ─── */
.clinic-team .ok { color: var(--ok); border-color: var(--ok); }
.clinic-team .late { color: #b26a00; border-color: #b26a00; }
.clinic-team .cancel { color: var(--danger); border-color: var(--danger); }

/* ─── Badge « Bientôt disponible » ─── */
.soon {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--accent); color: var(--accent);
}
.feature-visual.placeholder { border-style: dashed; background: transparent; }
.feature-visual .glyph { font-family: var(--serif); font-size: 5rem; color: var(--line-strong); }

/* ─── Diapositives intégrées ─── */
.slides-embed {
  width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius);
  background: #0b2e2b; display: block;
}
@media (max-width: 700px) { .slides-embed { aspect-ratio: 9 / 16; } }
.slides-actions { margin-top: 16px; }
.feature-visual.shot { aspect-ratio: 16 / 10; }
.feature-visual.shot img { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; box-shadow: none; }
