/* ===== Réglages : les couleurs se changent ici ===== */
:root {
  --fond: #15181b;
  --fond-2: #1c2024;
  --texte: #efebe3;
  --gris: #a9a59b;
  --papier: #ece8df;           /* fond des cartes */
  --encre: #25282c;            /* texte des cartes */
  --accent: #e6b073;           /* ambre. Pour du bleu : #6ea8ff */
  --ligne: rgba(255, 255, 255, .12);
  --titres: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--fond); color: var(--texte); }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titres); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.25rem; }
em { color: var(--accent); }
section { max-width: 1080px; margin: 0 auto; padding: 4rem 1.5rem; }
.gris { color: var(--gris); }

/* ===== Menu ===== */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  padding: .7rem 1.5rem; background: var(--fond); border-bottom: 1px solid var(--ligne);
}
.logo { display: flex; align-items: center; gap: .6rem; font: 700 1.15rem var(--titres); text-decoration: none; }
nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
nav a { display: flex; align-items: center; gap: .4rem; font-size: .95rem; text-decoration: none; color: var(--gris); }
nav a img { width: 20px; height: 20px; opacity: .75; }
nav a:hover { color: var(--accent); }

/* ===== Boutons ===== */
.bouton, .filtres button {
  display: inline-block; padding: .6rem 1.3rem; border: 1px solid var(--papier); border-radius: 6px;
  background: var(--papier); color: var(--encre); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--accent); border-color: var(--accent); }
.suite { margin-left: 1.2rem; color: var(--accent); text-decoration: none; }
.suite:hover { text-decoration: underline; }

/* ===== Accueil ===== */
.hero { display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; padding: 5rem 1.5rem 4rem; }
.chapo { font: 1.3rem/1.5 var(--titres); color: var(--gris); max-width: 32ch; margin: 0 0 2rem; }

/* ===== Titre de section : un titre, un filet fin ===== */
.titre-section { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; padding-bottom: .8rem; border-bottom: 1px solid var(--ligne); }
.titre-section h2 { margin: 0; }
.petit-titre { color: var(--gris); font: 600 .85rem system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; }

/* ===== Filtres : du texte, pas des pastilles ===== */
.filtres button { padding: .1rem .2rem; margin-left: .8rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--gris); font-weight: 400; }
.filtres button:hover { color: var(--texte); }
.filtres button.actif { color: var(--texte); border-bottom-color: var(--accent); }

/* ===== Cartes articles ===== */
.defile { display: flex; align-items: center; gap: .6rem; }
.liste { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; }
.carte { display: flex; flex-direction: column; padding: 1.8rem; border-radius: 14px; background: var(--papier); color: var(--encre); }
.liste .carte { flex: 0 0 310px; min-height: 380px; scroll-snap-align: start; }
.carte small { color: #6d695f; }
.carte h3 { margin: .5rem 0; font-size: 1.4rem; }
.carte p { margin: 0 0 1rem; }
.carte .tags { margin-top: auto; padding-bottom: .8rem; font-size: .9rem; color: #7a5a2c; }
.carte a { font-weight: 600; text-decoration: none; border-top: 1px solid rgba(0, 0, 0, .15); padding-top: .8rem; }
.carte a:hover { color: #7a5a2c; }
.carte[hidden] { display: none; }
.fleche { width: 42px; height: 42px; border: 1px solid var(--ligne); border-radius: 50%; background: none; color: var(--gris); font-size: 1.5rem; cursor: pointer; }
.fleche:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Colonnes ===== */
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.separe > div:first-child { padding-right: 3.5rem; border-right: 1px solid var(--ligne); }
.photo { margin: 0 0 1.5rem; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--fond-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.projet { padding: 1.2rem 0; border-bottom: 1px solid var(--ligne); }
.projet h3 { margin: 0 0 .3rem; }
.projet a { text-decoration: none; }
.projet a:hover { color: var(--accent); }
.projet p { margin: 0; color: var(--gris); }

/* ===== À propos ===== */
.valeurs { list-style: none; margin: 0; padding: 0; }
.valeurs li { display: flex; align-items: center; gap: 1.3rem; padding: 1.2rem 0; border-bottom: 1px solid var(--ligne); }
.valeurs li:first-child { padding-top: 0; }
.valeurs img { width: 50px; flex: none; }
.bloc { margin-bottom: 1.5rem; padding-left: 1.4rem; border-left: 3px solid var(--accent); color: var(--gris); }
.bloc h3 { color: var(--texte); }
.bloc p { margin: 0; }

/* ===== Pages d'article et de labo : confort de lecture ===== */
.article { max-width: 700px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.article.large { max-width: 1000px; }
.retour { color: var(--gris); text-decoration: none; }
.retour:hover { color: var(--accent); }
.article h1 { margin-top: 1.5rem; }
.meta { color: var(--gris); margin: 0 0 2rem; }
.texte { font: 1.2rem/1.8 var(--titres); }
.texte > p:first-of-type::first-letter { float: left; margin: .1em .12em 0 0; font-size: 3.6em; line-height: .8; color: var(--accent); }
.texte h2, .texte h3 { margin-top: 2em; }
.texte a { color: var(--accent); }
.texte blockquote { margin: 1.5em 0; padding-left: 1.2rem; border-left: 3px solid var(--accent); color: var(--gris); font-style: italic; }
.texte pre, .texte code { background: var(--fond-2); border-radius: 6px; font-size: .9em; }
.texte pre { padding: 1rem; overflow-x: auto; }
.texte code { padding: .1em .35em; }
.texte img { border-radius: 10px; }
.materiel h2 { margin-top: 2rem; font-size: 1.4rem; }
.materiel ul { padding-left: 1.2rem; }
.materiel li { margin-bottom: .5rem; }
.article .photo { max-width: 520px; margin: 2rem 0; }

/* ===== Pied de page ===== */
footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1.5rem; border-top: 1px solid var(--ligne); color: var(--gris); }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }
.in { padding: .1rem .5rem; border-radius: 4px; background: var(--papier); color: var(--encre); font-weight: 800; }

/* ===== Mobile ===== */
@media (max-width: 800px) {
  .deux-colonnes { grid-template-columns: 1fr; gap: 2rem; }
  .separe > div:first-child { padding: 0 0 2rem; border: 0; border-bottom: 1px solid var(--ligne); }
  .hero { padding-top: 2.5rem; gap: 2rem; }
  .fleche { display: none; }
  .liste .carte { flex-basis: 82%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
