@font-face {
  font-family: "Literata";
  src: url("/polices/literata.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/polices/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* Couleurs. Les primitives ne changent pas, seules les variables
   sémantiques sont redéfinies pour le mode sombre. */

:root {
  --bleu-pavillon: #123f75;
  --bleu-ciel: #93b4dc;

  --fond: #edf0f2;
  --surface: #f7f9fa;
  --encre: #17212d;
  --gris: #4b5664;
  --filet: #cbd2d9;
  --accent: var(--bleu-pavillon);
  --graisse-texte: 400;

  --titre: "Schibsted Grotesk", "Helvetica Neue", sans-serif;
  --texte: "Literata", Georgia, serif;

  --mesure: 38rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #121821;
    --surface: #1a222d;
    --encre: #e2e6eb;
    --gris: #a3adb9;
    --filet: #2c3644;
    --accent: var(--bleu-ciel);
    --graisse-texte: 350;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --fond: #121821;
  --surface: #1a222d;
  --encre: #e2e6eb;
  --gris: #a3adb9;
  --filet: #2c3644;
  --accent: var(--bleu-ciel);
  --graisse-texte: 350;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-weight: var(--graisse-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

/* Deux colonnes sur toute la largeur : moi à gauche, les projets à droite */

.page {
  padding: 0 clamp(1.5rem, 4vw, 4.5rem);
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 7rem);
}

.cote {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 3.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.cote h1 {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.cote h1 a {
  color: var(--encre);
  text-decoration: none;
}

.presentation {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}


.sommaire {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--titre);
  font-weight: 600;
}

.sommaire a {
  color: var(--encre);
  text-decoration: none;
  width: fit-content;
}

.sommaire a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.reglages {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  font-family: var(--titre);
  font-size: 0.9rem;
}

.theme {
  font: inherit;
  color: var(--gris);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--filet);
  text-underline-offset: 0.18em;
}

.theme:hover {
  color: var(--encre);
}

/* Colonne de droite */

.contenu {
  padding-top: 3.5rem;
  min-width: 0;
}

.section {
  padding: 0 0 4rem;
}

.section + .section {
  padding-top: 3rem;
  border-top: 1px solid var(--filet);
}

.section > h2 {
  font-size: 1.05rem;
  color: var(--gris);
  margin-bottom: 1.75rem;
}


/* Projets */

/* Le texte garde une longueur de ligne lisible, l'aperçu prend le reste. */
.projet {
  display: grid;
  grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
}

.projet + .projet {
  margin-top: 4.5rem;
}

.projet h3 {
  font-size: 1.85rem;
  letter-spacing: -0.01em;
  max-width: 34rem;
}

.projet h3 a {
  color: var(--encre);
  text-decoration-color: var(--filet);
}

.projet h3 a:hover {
  text-decoration-color: var(--accent);
}

.projet .contexte {
  margin: 0.5rem 0 1.25rem;
  font-family: var(--titre);
  font-size: 0.95rem;
  color: var(--gris);
}

.projet .outils {
  font-family: var(--titre);
  font-size: 0.9rem;
  color: var(--gris);
  margin: 0;
}

.apercu {
  display: block;
}

/* Aperçu de la chronologie */

.frise-apercu {
  text-decoration: none;
  color: var(--gris);
}

.frise-mini {
  position: relative;
  display: block;
  height: 9rem;
  background: var(--surface);
  border-top: 1px solid var(--encre);
  border-bottom: 1px solid var(--encre);
}

.frise-apercu:hover .frise-mini {
  border-color: var(--accent);
}

.frise-mini .trait {
  position: absolute;
  top: 0.75rem;
  width: 3px;
  margin-left: -1px;
}

.frise-mini .trait[data-importance="3"] { height: 6.5rem; }
.frise-mini .trait[data-importance="2"] { height: 4.75rem; }
.frise-mini .trait[data-importance="1"] { height: 3rem; }

.frise-bornes {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-family: var(--titre);
  font-size: 0.8rem;
}

/* Contact */

.contact .adresse {
  display: inline-block;
  font-family: var(--titre);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.15;
  word-break: break-word;
}

.contact .autres {
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-family: var(--titre);
}

.contact .bas {
  margin: 4rem 0 0;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--filet);
  font-family: var(--titre);
  font-size: 0.85rem;
  color: var(--gris);
}

/* Petits écrans : une seule colonne */

@media (max-width: 860px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 1rem;
  }

  .cote {
    position: static;
    height: auto;
    overflow: visible;
    padding: 2rem 0 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--filet);
  }

  .cote h1 {
    font-size: clamp(2.8rem, 13vw, 3.6rem);
  }

  .sommaire {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
  }

  .reglages {
    margin-top: 0;
  }

  .contenu {
    padding-top: 2.5rem;
  }

  .projet h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 1180px) {
  .projet {
    grid-template-columns: minmax(0, 1fr);
  }

  .projet .texte {
    max-width: 38rem;
  }

  .frise-mini {
    height: 6rem;
  }

  .frise-mini .trait[data-importance="3"] { height: 4.2rem; }
  .frise-mini .trait[data-importance="2"] { height: 3.1rem; }
  .frise-mini .trait[data-importance="1"] { height: 2rem; }
}

/* Page 404 */

.introuvable {
  max-width: 74rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.introuvable h1 {
  font-size: clamp(2.8rem, 9vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

/* Fiche d'un projet sans aperçu : quelques faits vérifiables */

.fiche {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--encre);
  border-bottom: 1px solid var(--encre);
  font-family: var(--titre);
}

.fiche img {
  flex: none;
  width: 4.5rem;
  height: auto;
}

.fiche dl {
  margin: 0;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 2rem;
}

.fiche dt {
  font-size: 0.85rem;
  color: var(--gris);
}

.fiche dd {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}
