/* CADEPLA : feuille de style. Couleurs d'accent prises dans le nuancier d'interférence SiO2/Si :
   bleu du premier ordre (≈ 115 nm, assombri pour le contraste) et or du premier ordre (≈ 220 nm). */

@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --encre: #1c2230;
  --encre-douce: #4f586c;
  --papier: #f3f5f8;
  --papier-2: #e7ebf1;
  --filet: #cfd6e0;
  --plaquette: #2b2e40;      /* gris-violet d'une plaquette de silicium */
  --plaquette-texte: #e4e7f0;
  --plaquette-doux: #a9afc4;
  --bleu: #34508f;           /* bleu du premier ordre, assombri */
  --bleu-fonce: #263d70;
  --or: #dac894;             /* or du premier ordre (≈ 220 nm) */
  --or-fonce: #c4ad6c;
  --rouge: #a3312a;
  --vert: #2d6a4f;

  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mesure: 36rem;           /* ≈ 70 caractères en Spectral 1.125rem */
  --large: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1.125rem/1.65 var(--serif);
  font-kerning: normal;
  hyphens: manual;
}
img, svg { max-width: 100%; }
a { color: var(--bleu); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--bleu-fonce); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }
.ouverture :focus-visible { outline-color: var(--or); }
sub { font-size: 0.7em; line-height: 0; }

.evitement { position: absolute; left: -999px; top: 0.5rem; z-index: 10; background: var(--encre); color: #fff; padding: 0.5rem 1rem; font-family: var(--sans); }
.evitement:focus { left: 1rem; }

.cadre { width: min(100% - 2.5rem, var(--large)); margin-inline: auto; }

/* ---------- en-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 5;
  background: rgba(43, 46, 64, 0.96);
  backdrop-filter: blur(6px);
  color: var(--plaquette-texte);
  font-family: var(--sans);
}
.entete-cadre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.marque { color: #fff; text-decoration: none; font: 600 1.05rem/1 var(--sans); letter-spacing: 0.06em; }
.entete nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; list-style: none; margin: 0; padding: 0.5rem 0; }
.entete nav a { color: var(--plaquette-texte); text-decoration: none; font-size: 0.92rem; }
.entete nav a:hover { color: #fff; text-decoration: underline; }
.entete nav .nav-contact { color: var(--or); }

/* ---------- ouverture ---------- */
.ouverture {
  background: var(--plaquette);
  color: var(--plaquette-texte);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}
.ouverture h1 {
  margin: 0;
  font: 700 clamp(3.4rem, 11vw, 8.5rem)/0.9 var(--serif);
  letter-spacing: -0.02em;
  color: #fff;
}
.chapeau { max-width: 30ch; margin: 1.4rem 0 0; font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.3; color: #fff; }
.porteur { max-width: var(--mesure); margin: 1rem 0 0; color: var(--plaquette-doux); font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

.bouton {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--or);
  border-radius: 3px;
  background: var(--or);
  color: var(--encre);
  font: 500 0.98rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { background: var(--or-fonce); border-color: var(--or-fonce); color: var(--encre); text-decoration: none; }
.bouton-second { background: transparent; color: var(--plaquette-texte); border-color: #6a6f88; }
.bouton-second:hover { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: var(--plaquette-texte); }

/* le nuancier : l'élément marquant de la page */
.nuancier { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.nuancier-bande {
  display: block; width: 100%; height: clamp(4.5rem, 11vw, 8rem);
  border-radius: 2px; cursor: crosshair; touch-action: none;
}
.nuancier-curseur { stroke: #fff; stroke-width: 2; display: none; }
.nuancier.actif .nuancier-curseur { display: inline; }
.graduations { display: flex; justify-content: space-between; margin-top: 0.45rem; font: 400 0.8rem/1 var(--sans); color: var(--plaquette-doux); }
.graduations span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.graduations span:last-child::after { content: "\00a0nm"; }
.graduations span:first-child { justify-content: flex-start; }
.graduations span:last-child { justify-content: flex-end; }
.nuancier figcaption { margin-top: 1.1rem; max-width: 46rem; color: var(--plaquette-doux); font-size: 0.98rem; }
.lecture { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; color: #fff; font-family: var(--sans); font-size: 0.95rem; min-height: 1.6rem; }
.lecture svg { width: 1.3rem; height: 1.3rem; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-claire { background: var(--papier-2); }
h2 { margin: 0 0 1.2rem; font: 600 clamp(1.7rem, 3.2vw, 2.35rem)/1.2 var(--serif); letter-spacing: -0.01em; max-width: 24ch; }
h3 { margin: 0 0 0.4rem; font: 600 1.2rem/1.3 var(--serif); }
p { margin: 0 0 1rem; }
.texte p { max-width: var(--mesure); }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.note { color: var(--encre-douce); font-size: 1rem; }

/* figure mesure / modèle */
.figure-spectre { margin: 0.4rem 0 0; }
.figure-spectre svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--filet); border-radius: 2px; }
.figure-spectre .grille line { stroke: #e3e7ee; stroke-width: 1; }
.figure-spectre .axe text { fill: var(--encre-douce); font: 400 12px var(--sans); }
.figure-spectre .modele { fill: none; stroke: var(--bleu); stroke-width: 2; }
.figure-spectre .mesure circle { fill: var(--encre); }
.figure-spectre figcaption, .partenaires-titre { margin-top: 0.7rem; color: var(--encre-douce); font: 400 0.9rem/1.45 var(--sans); }

/* fonctions : liste à filets, pas de cartes */
.fonctions {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 2.75rem);
}
.fonctions li { border-top: 2px solid var(--encre); padding: 1rem 0 2rem; }
.fonctions p { font-size: 1.02rem; color: #2c3446; margin: 0; }

.sous-titre { margin: 1.5rem 0 1.2rem; font-size: 1.35rem; }
.etapes {
  list-style: none; counter-reset: etape; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
.etapes li { counter-increment: etape; display: grid; gap: 0.3rem; padding-left: 2.6rem; position: relative; }
.etapes li::before {
  content: counter(etape);
  position: absolute; left: 0; top: -0.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--plaquette); color: var(--or);
  font: 600 0.95rem/1 var(--sans);
}
.etapes strong { font: 600 1.05rem/1.3 var(--serif); }
.etapes span { font-size: 0.98rem; color: var(--encre-douce); }

/* applications et tableau */
.applications { margin: 0; padding: 0; list-style: none; }
.applications li { padding: 0.75rem 0; border-bottom: 1px solid var(--filet); }
.applications li:first-child { border-top: 1px solid var(--filet); }
.titre-tableau { font-size: 1.35rem; }
.en-bref { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.95rem; }
.en-bref th, .en-bref td { text-align: left; vertical-align: top; padding: 0.7rem 0; border-bottom: 1px solid var(--filet); }
.en-bref tr:first-child th, .en-bref tr:first-child td { border-top: 2px solid var(--encre); }
.en-bref th { font-weight: 500; width: 46%; padding-right: 1rem; color: var(--encre-douce); }

/* projet */
.equipe { margin: 1.8rem 0 0; display: grid; gap: 1rem; }
.equipe div { border-left: 3px solid var(--or-fonce); padding-left: 1rem; }
.equipe dt { font-weight: 600; }
.equipe dd { margin: 0; color: var(--encre-douce); font-size: 1rem; }
.partenaires { background: #fff; border: 1px solid var(--filet); border-radius: 2px; padding: 1.75rem; }
.partenaires-titre { margin: 0 0 0.9rem; }
.partenaires-titre + .logo-financeur { margin-bottom: 1.8rem; }
.logo-financeur { display: block; width: 120px; height: auto; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; align-items: center; }
.logos img { display: block; height: 72px; width: auto; }

/* formulaire */
.formulaire { display: grid; gap: 1.1rem; font-family: var(--sans); }
.champ { display: grid; gap: 0.35rem; }
.champ label { font-weight: 500; font-size: 0.95rem; }
.facultatif { font-weight: 400; color: var(--encre-douce); }
.champ input[type="text"], .champ input[type="email"], .champ select, .champ textarea {
  width: 100%; padding: 0.7rem 0.8rem;
  border: 1px solid #a9b2c2; border-radius: 3px; background: #fff;
  color: var(--encre); font: 400 1rem/1.4 var(--sans);
}
.champ textarea { resize: vertical; min-height: 9rem; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible { outline-offset: 1px; border-color: var(--bleu); }
.champ input[aria-invalid="true"], .champ select[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border-color: var(--rouge); }
.champ-case { grid-template-columns: auto 1fr; align-items: start; column-gap: 0.7rem; }
.champ-case input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--bleu); }
.champ-case label { font-weight: 400; }
.champ-case .champ-erreur { grid-column: 2; }
.champ-erreur { margin: 0; color: var(--rouge); font-size: 0.9rem; }
.formulaire .bouton { justify-self: start; background: var(--bleu); border-color: var(--bleu); color: #fff; }
.formulaire .bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); color: #fff; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message { border-left: 4px solid; padding: 0.9rem 1.1rem; margin-bottom: 1.4rem; font-family: var(--sans); font-size: 0.98rem; background: #fff; }
.message p { margin: 0; }
.message-succes { border-color: var(--vert); }
.message-erreur { border-color: var(--rouge); }

/* pied de page */
.pied { background: var(--plaquette); color: var(--plaquette-doux); padding: 2.5rem 0 3rem; font: 400 0.9rem/1.55 var(--sans); }
.pied p { margin: 0 0 1rem; }
.pied summary { cursor: pointer; color: var(--plaquette-texte); }
.pied dl { margin: 1rem 0 0; display: grid; gap: 0.8rem; max-width: 46rem; }
.pied dt { color: var(--plaquette-texte); font-weight: 500; }
.pied dd { margin: 0; }

/* ---------- petits écrans ---------- */
@media (max-width: 960px) {
  .fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
}
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .deux-colonnes { grid-template-columns: minmax(0, 1fr); }
  .fonctions, .etapes { grid-template-columns: minmax(0, 1fr); }
  .entete nav ul { gap: 0.2rem 1rem; }
  .entete nav a { font-size: 0.86rem; }
  .graduations span:nth-child(even) { visibility: hidden; }
  .en-bref th { width: 42%; }
}

/* --- Ajouts : logo d'en-tête, langue, remerciements, captures --- */
.marque { display: inline-flex; align-items: center; gap: 0.6rem; }
.marque-logo { display: block; width: 2.1rem; height: 2.1rem; border-radius: 22%; }

.entete nav .nav-langue {
  border: 1px solid var(--plaquette-doux); border-radius: 999px;
  padding: 0.1rem 0.7rem; color: var(--plaquette-texte);
}
.entete nav .nav-langue:hover { border-color: #fff; color: #fff; text-decoration: none; }

.intro-section { max-width: var(--mesure); margin: 0 0 1.6rem; color: var(--encre-douce); }

.remerciements { margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.remerciements div { border-left: 3px solid var(--or-fonce); padding-left: 1rem; }
.remerciements dt { font-weight: 600; }
.remerciements dd { margin: 0; color: var(--encre-douce); font-size: 1rem; }
.remerciements-note { margin-top: 1.6rem; }

.captures { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.captures figure { margin: 0; }
.captures img { display: block; width: 100%; height: auto; border: 1px solid var(--filet); border-radius: 3px; background: #fff; }
.captures figcaption { margin-top: 0.7rem; color: var(--encre-douce); font: 400 0.9rem/1.45 var(--sans); }

/* --- Références --- */
.references { margin: 0; padding-left: 1.4rem; display: grid; gap: 1rem; max-width: 60rem; }
.references li { padding-left: 0.3rem; line-height: 1.55; }
.references em { font-style: italic; }
.ref-lien { white-space: nowrap; font-family: var(--sans); font-size: 0.92rem; }
.a-preciser { color: var(--encre-douce); font-style: italic; }
