/* voirol.org : feuille de style unique.
   Fond blanc à points discrets, panneau principal encadré, navigation en onglets.
   Volontairement sobre : pas d'animation de survol, pas de couleur par catégorie,
   pas de flèches décoratives. */

/* ---------- Polices (SIL Open Font License 1.1) ---------- */
@font-face {
  font-family: "Lexend Deca";
  src: url("../fonts/LexendDeca-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --text: #23231f;
  --muted: #55554f;
  --accent: #3f4a9e;
  --accent-dark: #2e367a;
  --line: #dde3e8;          /* filets intérieurs */
  --frame: #80849c;         /* bordure du panneau et des onglets */
  --frame-w: 1px;
  --panel: #f6f7fb;
  --tab: #e7e9f4;           /* onglets inactifs */
  --tab-frame: #c9ccdc;     /* bordure des onglets inactifs */
  --dot: #f5f7f8;
  --radius: 8px;
  --radius-panel: 14px;
  --shadow-panel: 0 4px 10px rgba(35, 35, 31, 0.06), 0 22px 60px rgba(35, 35, 31, 0.14);
  --max: 68rem;
  --font-title: "Lexend Deca", "Lexend", system-ui, sans-serif;
  --font-text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  /* Points en quinconce (réseau hexagonal) : deux grilles décalées d'une demi-maille */
  background-color: #fff;
  background-image:
    radial-gradient(circle, var(--dot) 1.75px, transparent 2.25px),
    radial-gradient(circle, var(--dot) 1.75px, transparent 2.25px);
  background-size: 14px 24.25px;
  background-position: 0 0, 7px 12.12px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

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

a:hover {
  color: var(--accent-dark);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

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

/* ---------- Coque de page : onglets + panneau ---------- */
/* .shell regroupe les onglets (header) et le panneau principal (main),
   centrés verticalement dans la fenêtre. */
.shell {
  margin-block: auto;
  padding-block: clamp(1rem, 4vh, 3rem);
}

/* Onglets de classeur posés sur le bord supérieur du panneau */
.site-header {
  position: relative;
  z-index: 1;
  padding-inline: clamp(0.75rem, 2.5vw, 1.5rem);
}

.site-nav ul {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li.nav-end {
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  background: var(--tab);
  border: var(--frame-w) solid var(--tab-frame);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: #fff;
  color: var(--text);
}

/* Onglet actif : même fond que le panneau, recouvre sa bordure supérieure */
.site-nav a[aria-current] {
  margin-bottom: calc(var(--frame-w) * -1);
  padding-bottom: calc(0.45rem + var(--frame-w));
  background: var(--panel);
  border-color: var(--frame);
  color: var(--text);
  font-weight: 700;
}

.site-nav .tab-logo {
  width: 22px;
  height: 22px;
}

.page-panel {
  padding: clamp(1.25rem, 4vw, 2.75rem);
  background: var(--panel);
  border: var(--frame-w) solid var(--frame);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 0.5rem;
  }
  .site-nav ul {
    gap: 0.2rem;
  }
  .site-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.92rem;
  }
  .site-nav a[aria-current] {
    padding-bottom: calc(0.4rem + var(--frame-w));
  }
  .site-nav .tab-label-home {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Boutons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--accent);
}

.btn-secondary:hover {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: underline;
}

/* ---------- Accueil : bloc unique ---------- */
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 13rem) 1fr;
  gap: clamp(1.25rem, 3.5vw, 3rem);
  align-items: center;
}

.portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-panel h1 {
  margin-bottom: 0.2em;
}

.hero-panel .role {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  line-height: 1.4;
  color: var(--accent-dark);
  margin-bottom: 0.9rem;
}

.hero-panel .role span {
  display: block;
  font-size: 0.8em;
  color: var(--muted);
}

.hero-panel .intro {
  max-width: 38rem;
}

.hero-panel .intro p:last-child {
  margin-bottom: 0;
}

/* Projets phares : une ligne par projet */
.highlights {
  grid-column: 1 / -1;
}

.highlights h2 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.project-list li {
  border-bottom: 1px solid var(--line);
}

.project-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 1rem;
  padding: 0.6rem 0.25rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
}

.project-list strong {
  font-family: var(--font-title);
  font-weight: 400;
}

.project-list span {
  font-size: 0.9rem;
  color: var(--muted);
}

.project-list a:hover strong {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 640px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
  .portrait {
    max-width: 8rem;
  }
}

/* ---------- Page projet (gabarit) ---------- */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
}

.project-head {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.project-head .lead {
  font-size: 1.15rem;
  margin: 0;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.project-body {
  max-width: 42rem;
}

.project-body h2:not(:first-child) {
  margin-top: 1.75rem;
}

.project-body h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.project-body ul {
  padding-left: 1.2rem;
  margin: 0 0 1em;
}

.project-body li + li {
  margin-top: 0.25rem;
}

/* Fiche synthétique : commanditaire, période, rôle, public, outils */
.facts {
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.facts h2 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.facts dl {
  margin: 0;
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0 0 0.75rem;
}

.facts dd:last-child {
  margin-bottom: 0;
}

.back {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .project-layout {
    grid-template-columns: 1fr;
  }
  .facts {
    order: -1;
  }
}

/* ---------- Sections (pages intérieures) ---------- */
.section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* ---------- Cartes projet (page Projets) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
}

.card h3 {
  margin: 0.25rem 0;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

/* Toute la carte est cliquable via le lien du titre */
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card h3 a:focus-visible {
  outline: none;
}

.card h3 a:focus-visible::after {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.card .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Étiquette neutre (type de projet) */
.label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Page projet : visuels, vidéos, liens, équipe ---------- */
.lead p:last-child {
  margin-bottom: 0;
}

.project-head .lead {
  font-size: 1.15rem;
}

.project-visual {
  width: auto;
  max-width: min(100%, 40rem);
  max-height: 22rem;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.pixelated {
  image-rendering: pixelated;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  border-radius: var(--radius);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.video {
  margin: 0;
}

.video-frame {
  aspect-ratio: 16 / 9;
}

.video-frame iframe,
.video video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

.video figcaption {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.transcript {
  margin-top: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.transcript summary {
  cursor: pointer;
  font-weight: 700;
}

.transcript[open] summary {
  margin-bottom: 0.5rem;
}

.links {
  padding-left: 1.2rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9em;
}

.credits {
  margin: 0;
}

.credits dt {
  font-weight: 700;
}

.credits dd {
  margin: 0 0 0.6rem;
}

/* ---------- Page Projets ---------- */
.project-group + .project-group {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.project-group h2 {
  font-size: 1.3rem;
}

.card-img {
  width: calc(100% + 2.4rem);
  max-width: none;
  margin: -1.1rem -1.2rem 0.9rem;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ---------- Page Parcours ---------- */
.page-panel > section + section,
.page-panel > .lead + section {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.page-panel > h1 + .lead,
.page-panel > h1 + section {
  margin-bottom: 1.5rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline > li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline .when {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline h3 {
  font-size: 1.1rem;
  margin: 0;
}

.timeline .where {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.timeline p:last-child,
.timeline ul:last-child {
  margin-bottom: 0;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
}

.skills > div {
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.skills dt {
  font-family: var(--font-title);
  margin-bottom: 0.3rem;
}

.skills dd {
  margin: 0;
}

.skills dd p:last-child,
.skills dd ul:last-child {
  margin-bottom: 0;
}

.languages {
  padding-left: 1.2rem;
}

@media (max-width: 640px) {
  .timeline > li {
    grid-template-columns: 1fr;
  }
}

/* ---------- Page Contact ---------- */
.contact-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list .label {
  display: inline-block;
  min-width: 6rem;
  font-weight: 700;
}

/* ---------- Pied de page (discret) ---------- */
.site-footer {
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  padding-block: 0.5rem 1.25rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ---------- Marqueurs de contenu manquant ---------- */
.todo {
  background: #fff4cc;
  color: #5a4600;
  padding: 0 0.25rem;
  border-radius: 3px;
  font-size: 0.9em;
}
