* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #111;
  --text: #444;
  --muted: #555;
  --bg: #ffffff;
  --hover: #f3f1ec;
  --line: #eee;
  --kicker: #0b7a56;
  --shelf: #111;
  --on-ink: #fff;
  color-scheme: light;
  --green: #0f9b6e;
  --blue: #1f5fd1;
  --orange: #f07a1a;
  --red: #d91e36;
}

/* Mode sombre : choisi avec le bouton, ou celui du système si rien n'a été choisi */
:root[data-theme="dark"] {
  --ink: #f4f2ed;
  --text: #c6c2d0;
  --muted: #a09bb0;
  --bg: #0f0e13;
  --hover: #1d1b24;
  --line: #24222c;
  --kicker: #5fd3a8;
  --shelf: #e3cf9f;
  --on-ink: #0f0e13;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f4f2ed;
    --text: #c6c2d0;
    --muted: #a09bb0;
    --bg: #0f0e13;
    --hover: #1d1b24;
    --line: #24222c;
    --kicker: #5fd3a8;
    --shelf: #e3cf9f;
    --on-ink: #0f0e13;
    color-scheme: dark;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* En-tête */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.name { font-family: 'DM Serif Display', Georgia, serif; font-size: 24px; }
.prefs { display: flex; align-items: center; gap: 10px; }
.lang { font-size: 14px; color: var(--muted); }
.lang button {
  min-width: 36px;
  min-height: 36px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.lang button:hover { background: var(--hover); }
.theme-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-btn:hover { background: var(--hover); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

/* Présentation */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; flex: 1; }
.intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--kicker); }
h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1.5px;
}
h1 em { font-style: italic; }
.bio { font-size: 18px; line-height: 1.6; color: var(--text); }
.linkedin {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.linkedin:hover { background: var(--ink); color: var(--on-ink); }
[hidden] { display: none !important; }

/* La pile d'applis */
.pile { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; }
.book {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 10px 26px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: inset -14px 0 0 rgba(255, 255, 255, 0.18);
}
.book > div { display: flex; flex-direction: column; min-width: 0; }
.book-title { font-family: 'DM Serif Display', Georgia, serif; font-size: 26px; }
.book-sub { font-size: 13px; }
.badge { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-text { font-size: 13px; font-weight: 700; white-space: nowrap; }

.collection {
  margin-left: 10px;
  padding: 22px 26px;
  border-radius: 10px 10px 4px 4px;
  background: var(--green);
  color: #fff;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.collection .book-head { display: flex; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
.collection .book-head > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.collection h2 { font-family: 'DM Serif Display', Georgia, serif; font-size: 34px; font-weight: 400; line-height: 1.1; }
.collection .book-sub { font-size: 14px; color: #dff4ec; }
.collection p { font-size: 15px; line-height: 1.6; color: #f0faf6; }
.collection .actions { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}
.btn.white { background: #fff; color: #0b6b4b; }
.btn.dark { background: rgba(0, 0, 0, 0.22); color: #fff; }
.btn.link { padding: 0 10px; color: #fff; font-weight: 600; }
.btn:hover { filter: brightness(0.95); }
.btn.link:hover { text-decoration: underline; }

.voyages { margin-right: 34px; background: var(--blue); color: #fff; }
.voyages .book-sub { color: #dbe6fb; }
.voyages .badge { background: rgba(255, 255, 255, 0.2); }
.routine { margin-left: 22px; background: var(--orange); color: #111; box-shadow: inset -14px 0 0 rgba(255, 255, 255, 0.25); }
.routine .book-sub { color: #3a1d05; }
.routine .badge { background: rgba(255, 255, 255, 0.35); }
.about { margin: 0 14px 0 4px; border-radius: 4px 4px 10px 10px; background: var(--red); color: #fff; }
.about .book-sub { color: #fde3e6; }
.about:hover { filter: brightness(1.05); }
.shelf { height: 14px; margin-top: 4px; border-radius: 4px; background: var(--shelf); }

/* Pied de page */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* Lien vers la page de détail, sur la carte Collection */
.title-link { text-decoration: none; }
.title-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.collection .actions .btn { flex: 1 1 auto; justify-content: center; padding: 0 14px; }
.collection .links { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
.collection .links a { font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; padding: 4px 0; }
.collection .links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Page de détail d'une appli */
.detail { gap: 64px; max-width: 980px; }
.back { font-weight: 600; text-decoration: none; color: var(--muted); padding: 8px 0; }
.back:hover { color: var(--ink); }
.detail-hero {
  background: var(--green);
  color: #fff;
  border-radius: 18px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  box-shadow: inset -18px 0 0 rgba(255, 255, 255, 0.18);
}
.detail-hero h1 { font-size: clamp(48px, 8vw, 84px); }
.detail-tagline { font-size: 20px; line-height: 1.5; max-width: 620px; color: #f0faf6; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn.green { background: #fff; color: #0b6b4b; }
.btn.outline { border: 2px solid currentColor; }
.btn.plain { padding: 0 10px; font-weight: 600; }
.btn svg { margin-right: 8px; flex-shrink: 0; }

/* Page Qui suis-je ? : même gabarit, en rouge comme sa carte sur l'accueil */
.about-hero { background: var(--red); position: relative; padding-right: 300px; }
/* Photo à droite du rectangle rouge ; masquée tant que photo.jpg n'existe pas */
.about-photo {
  position: absolute; right: 56px; top: 50%; transform: translateY(-50%);
  width: 200px; height: 200px; object-fit: cover; border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.about-hero:not(:has(.about-photo)) { padding-right: 40px; }
.about-hero .kicker { color: #fde3e6; }
.about-hero .detail-tagline { color: #fdf0f2; }
.about-hero .btn.green { color: #a3152a; }
.detail-cta.about-cta .btn.green { background: var(--red); color: #fff; }
.btn.plain:hover { text-decoration: underline; }

.story { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.story-block { display: flex; flex-direction: column; gap: 14px; padding-left: 20px; border-left: 4px solid var(--green); }
.story-block + .story-block { border-left-color: var(--blue); }
.story-text { font-family: 'DM Serif Display', Georgia, serif; font-size: 23px; line-height: 1.45; color: var(--ink); }

.shots { display: flex; gap: 20px; align-items: flex-end; }
.shots img { display: block; min-width: 0; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.shots img:first-child { flex: 3 1 0; width: 100%; }
.shots img.phone { flex: 1 1 0; width: 100%; max-width: 230px; border-radius: 22px; }

.features h2, .detail-cta h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(32px, 5vw, 44px); line-height: 1.1; }
.feature-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.feature-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.feature-grid .dot { width: 26px; height: 8px; border-radius: 3px; }
.feature-grid h3 { font-size: 17px; }
.feature-grid p { font-size: 15px; line-height: 1.55; color: var(--text); }

.detail-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.detail-cta p { font-size: 17px; color: var(--text); }
.detail-cta .btn.green { background: var(--green); color: #fff; }
.detail-cta .btn.outline { color: var(--ink); }

a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (max-width: 600px) {
  .page { padding: 24px 16px 40px; gap: 40px; }
  .hero { gap: 40px; }
  .collection, .voyages, .routine, .about { margin-left: 0; margin-right: 0; }
  .book { padding: 12px 18px; }
  .collection { padding: 20px 18px; }
  .book-title { font-size: 22px; }
  .detail { gap: 48px; }
  .detail-hero { padding: 32px 22px; border-radius: 14px; }
  .detail-tagline { font-size: 18px; }
  .about-hero, .about-hero:not(:has(.about-photo)) { padding-right: 22px; }
  .about-photo { position: static; transform: none; width: 112px; height: 112px; border-width: 4px; }
  .story-text { font-size: 20px; }
  .shots { gap: 10px; }
  .shots img.phone { border-radius: 14px; }
}
