/* Centre IDTDS, feuille de style unique.
   Couleurs tirées du logo (bleu des ondes) et d'un orange ivoirien utilisé avec parcimonie. */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --nuit: #0f2a47;      /* fond du bandeau, pied de page, texte principal */
  --lagune: #1c4f82;    /* bleu du logo : liens, titres secondaires */
  --onde: #8db3db;      /* ondes du héros, filets sur fond sombre */
  --brume: #edf2f7;     /* sections alternées */
  --papier: #ffffff;
  --gris: #4d5c6d;      /* texte secondaire */
  --orange: #e2761b;    /* accent : focus, repères, jamais pour du texte courant */
  --filet: #d3dde8;

  --f-titre: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --f-texte: "Source Serif", Georgia, "Times New Roman", serif;

  --t-0: 0.889rem;  /* 16px */
  --t-1: 1rem;      /* 18px */
  --t-2: 1.25rem;   /* 22.5px */
  --t-3: 1.563rem;  /* 28px */
  --t-4: 1.953rem;  /* 35px */
  --t-5: 2.441rem;  /* 44px */

  --wrap: 72rem;
  --mesure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--papier); color: var(--nuit);
  font-family: var(--f-texte); font-size: var(--t-1); line-height: 1.65;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lagune); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--nuit); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--f-titre); line-height: 1.15; margin: 0 0 0.6em; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: var(--t-4); }
h3 { font-size: var(--t-2); font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.mesure { max-width: var(--mesure); }
.muted { color: var(--gris); }

.skip { position: absolute; left: -999px; top: 0; background: var(--papier); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--filet); backdrop-filter: saturate(1.4) blur(6px); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.2rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--nuit); }
.brand__text { font-family: var(--f-titre); font-weight: 700; font-size: var(--t-2); letter-spacing: -0.015em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.75rem; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { font-family: var(--f-titre); font-size: var(--t-0); font-weight: 500; color: var(--nuit); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--filet); }
.nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.nav .lang { border: 1px solid var(--filet); border-radius: 2rem; padding: .3rem .85rem; color: var(--lagune); }
.nav .lang:hover { border-color: var(--lagune); }
.nav-toggle { display: none; margin-left: auto; font: 500 var(--t-0) var(--f-titre); background: none; border: 1px solid var(--filet); border-radius: 2rem; padding: .4rem 1rem; color: var(--nuit); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--papier); border-bottom: 1px solid var(--filet); flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem 1.5rem; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: .4rem; }
  .nav a { font-size: var(--t-1); }
  .js .nav-toggle + .nav:not(.is-open) { display: none; }
  html:not(.js) .nav { display: flex; position: static; padding: 0 0 1rem; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-block; font: 600 var(--t-0)/1 var(--f-titre); text-decoration: none; padding: .95rem 1.4rem; border-radius: .35rem; border: 2px solid transparent; transition: background-color .15s, color .15s; }
.btn--plein { background: var(--papier); color: var(--nuit); }
.btn--plein:hover { background: var(--brume); color: var(--nuit); }
.btn--trait { border-color: rgba(255,255,255,.55); color: var(--papier); }
.btn--trait:hover { border-color: var(--papier); color: var(--papier); }
.btn--bleu { background: var(--lagune); color: var(--papier); }
.btn--bleu:hover { background: var(--nuit); color: var(--papier); }

/* ---------- Héros de l'accueil : les ondes du logo ---------- */
.hero { position: relative; overflow: hidden; background: var(--nuit); color: var(--papier); }
.hero__inner { position: relative; z-index: 1; padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem); }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; max-width: 12ch; margin-bottom: .5em; font-variation-settings: "opsz" 96; }
.hero p { font-size: var(--t-2); line-height: 1.5; max-width: 31rem; color: #dbe6f2; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.ondes { position: absolute; z-index: 0; right: -14rem; bottom: -22rem; width: 62rem; height: auto; pointer-events: none; }
.ondes circle { fill: none; stroke: var(--onde); stroke-width: 1.5; }
.ondes .o-point { fill: var(--orange); stroke: none; }
.ondes .o-bouton { stroke: var(--orange); stroke-width: 6; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .ondes circle:not(.o-point) { stroke-dasharray: var(--l); stroke-dashoffset: var(--l); animation: trace 1.6s cubic-bezier(.3,.6,.2,1) forwards; animation-delay: calc(var(--i) * 110ms); }
  @keyframes trace { to { stroke-dashoffset: 0; } }
}
@media (max-width: 860px) {
  .ondes { width: 46rem; right: -27rem; bottom: -27rem; opacity: .5; }
}

/* ---------- En-tête des pages intérieures ---------- */
.page-head { background: var(--nuit); color: var(--papier); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; padding: 3.5rem 0 3rem; }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; font-weight: 700; margin-bottom: .35em; }
.page-head p { color: #dbe6f2; font-size: var(--t-2); max-width: 34rem; margin: 0; line-height: 1.5; }
.page-head .ondes { width: 36rem; right: -8rem; bottom: -16rem; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--brume { background: var(--brume); }
.section__intro { max-width: var(--mesure); margin-bottom: 2.75rem; }
.section__intro p { color: var(--gris); }

/* Deux colonnes : titre à gauche, contenu à droite */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2.5rem 4rem; }
.split > h2 { position: sticky; top: 6rem; align-self: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > h2 { position: static; } }

/* Repères chiffrés de l'accueil */
.faits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; }
.faits > div { padding: 0 1.5rem; border-left: 1px solid var(--filet); }
.faits > div:first-child { padding-left: 0; border-left: 0; }
.faits dt { font-family: var(--f-titre); font-size: var(--t-4); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; color: var(--lagune); }
.faits dd { margin: .45rem 0 0; color: var(--gris); font-size: var(--t-0); line-height: 1.5; }
@media (max-width: 860px) {
  .faits { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .faits > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .faits dt { font-size: var(--t-3); }
  .faits > div { padding: 0 1rem; }
}

/* Liste d'activités / de domaines */
.rubriques { list-style: none; margin: 0; padding: 0; }
.rubriques > li { padding: 1.6rem 0; border-top: 1px solid var(--filet); }
.rubriques > li:last-child { border-bottom: 1px solid var(--filet); }
.rubriques h3 { margin-bottom: .4em; }
.rubriques p { margin: 0; max-width: 40rem; }
.rubriques p + p { margin-top: .8em; }

/* Domaines détaillés */
.domaine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem 4rem; padding: 3rem 0; border-top: 1px solid var(--filet); scroll-margin-top: 5rem; }
.domaine:first-of-type { border-top: 0; padding-top: 0; }
.domaine h2 { font-size: var(--t-4); }
.domaine__corps { max-width: 40rem; }
.domaine__corps h3 { font-size: var(--t-1); margin-top: 1.6em; color: var(--lagune); }
.domaine__corps ul { padding-left: 1.1em; margin: 0 0 1em; }
.domaine__corps li { margin-bottom: .35em; }
.domaine__corps li::marker { color: var(--orange); }
@media (max-width: 860px) { .domaine { grid-template-columns: 1fr; } }

.sommaire { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 1.6rem 0 0; padding: 0; }
.sommaire a { display: inline-block; color: var(--papier); text-decoration: none; font: 500 var(--t-0) var(--f-titre); border: 1px solid rgba(255,255,255,.4); border-radius: 2rem; padding: .35rem .9rem; }
.sommaire a:hover { border-color: var(--papier); color: var(--papier); }

/* Bandeau IndabaX */
.indabax { background: var(--lagune); color: var(--papier); }
.indabax .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.indabax h2 { font-size: var(--t-4); margin-bottom: .4em; }
.indabax p { color: #e1ebf6; margin: 0; }
.indabax__date { font-family: var(--f-titre); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -0.035em; margin: 0 0 .5rem; color: var(--papier); }
.indabax__lieu { font-size: var(--t-0); }
.indabax a { color: var(--papier); }
@media (max-width: 860px) { .indabax .wrap { grid-template-columns: 1fr; align-items: start; } }

/* Frise chronologique (vraie séquence) */
.frise { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--filet); }
.frise li { position: relative; padding: 0 0 2rem 1.75rem; }
.frise li::before { content: ""; position: absolute; left: -7px; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--papier); border: 2px solid var(--lagune); }
.frise li.a-venir::before { background: var(--orange); border-color: var(--orange); }
.frise time { font-family: var(--f-titre); font-weight: 600; color: var(--lagune); font-size: var(--t-0); }
.frise h3 { margin: .15rem 0 .3rem; }
.frise p { margin: 0; color: var(--gris); max-width: 36rem; }

/* Équipe */
.equipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2.75rem 2rem; }
.person__photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--brume); width: min(9.5rem, 100%); margin-bottom: 1.1rem; box-shadow: 0 0 0 1px var(--filet); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__initials { display: grid; place-items: center; height: 100%; font: 600 var(--t-4) var(--f-titre); color: var(--lagune); }
.person__name { font-size: var(--t-1); margin: 0 0 .2rem; }
.person__field { margin: 0 0 .35rem; color: var(--lagune); font-size: var(--t-0); line-height: 1.45; }
.person__where { margin: 0; color: var(--gris); font-size: var(--t-0); line-height: 1.45; }

@media (max-width: 520px) { .equipe { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; } .person__photo { width: 7rem; } }

/* Visages en bande sur l'accueil */
.visages { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 2rem; padding: 0 0 0 .8rem; }
.visages li { width: 4.6rem; height: 4.6rem; border-radius: 50%; overflow: hidden; border: 3px solid var(--papier); margin: 0 0 -.4rem -.8rem; background: var(--brume); }
@media (max-width: 520px) { .visages li { width: 3.6rem; height: 3.6rem; } }
.visages img { width: 100%; height: 100%; object-fit: cover; }

/* Bureau et membres */
.bureau { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 2.5rem; }
.bureau > div { padding: .85rem 0; border-top: 1px solid var(--filet); }
.bureau dt { font-family: var(--f-titre); font-weight: 600; }
.bureau dd { margin: 0; color: var(--gris); font-size: var(--t-0); }
.membres { columns: 3 14rem; column-gap: 2.5rem; list-style: none; padding: 0; margin: 0; }
.membres li { padding: .3rem 0; break-inside: avoid; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem 5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.coord { margin: 0; }
.coord > div { padding: 1rem 0; border-top: 1px solid var(--filet); }
.coord dt { font-family: var(--f-titre); font-weight: 600; font-size: var(--t-0); color: var(--gris); }
.coord dd { margin: .2rem 0 0; }
.form { display: grid; gap: 1.25rem; }
.form label { display: block; font: 600 var(--t-0) var(--f-titre); margin-bottom: .35rem; }
.form input, .form textarea, .form select { width: 100%; font: inherit; font-size: var(--t-1); color: var(--nuit); background: var(--papier); border: 1px solid #a9b8c8; border-radius: .3rem; padding: .7rem .8rem; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 3px solid var(--orange); outline-offset: 0; border-color: var(--nuit); }
.form textarea { min-height: 11rem; resize: vertical; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }
.form .piege { position: absolute; left: -9999px; }
.form button { justify-self: start; cursor: pointer; }
.notice { padding: 1rem 1.2rem; border-radius: .3rem; margin-bottom: 1.5rem; border-left: 4px solid; }
.notice--ok { background: #e6f4ec; border-color: #1e7a4f; }
.notice--err { background: #fdeee4; border-color: var(--orange); }

/* Bandeau d'appel au contact */
.appel { background: var(--brume); }
.appel .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding: 3rem 0; }
.appel h2 { font-size: var(--t-3); margin: 0 0 .3em; }
.appel p { margin: 0; color: var(--gris); max-width: 34rem; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--nuit); color: #c9d7e6; font-size: var(--t-0); line-height: 1.55; }
.site-footer a { color: #e7eef6; }
.site-footer a:hover { color: var(--papier); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.site-footer__id img { margin-bottom: 1rem; }
.site-footer__id strong { color: var(--papier); font-family: var(--f-titre); }
.site-footer__legal { color: #9db1c7; }
.site-footer__title { font-size: var(--t-0); font-weight: 600; color: var(--papier); margin-bottom: .8rem; letter-spacing: 0; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { margin-bottom: .35rem; }
.site-footer__base { border-top: 1px solid rgba(141,179,219,.25); padding: 1.2rem 0 1.6rem; color: #9db1c7; }
.site-footer__base p { margin: 0; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__id { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .ondes, .hero__actions, .appel { display: none; }
  .hero, .page-head, .indabax { background: none; color: #000; }
}
