/* Starbay, page de l'alpha : les jetons et les styles de la charte (version 7), atkinson hyperlegible next partout */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("polices/AtkinsonHyperlegibleNext.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("polices/geist-mono-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --noir: #000000;
  --nuit: #111111;
  --trait: #2b2b2b;
  --gris: #8c8c8c;
  --blanc: #f2f2f2;
  --voile: 242, 242, 242;
  --vif: #ffffff;
  --r-bouton: 999px;
  --r-boite: 22px;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titre: var(--sans);
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --art: "Cascadia Mono", Consolas, Menlo, ui-monospace, monospace;
  --lent: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
html[data-theme="clair"] { --noir: #f7f7f5; --nuit: #ededeb; --trait: #d4d4d2; --gris: #6b6b6b; --blanc: #121212; --voile: 0, 0, 0; --vif: #000000; color-scheme: light; }

* { box-sizing: border-box; }
html { background: var(--noir); color: var(--blanc); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--blanc); color: var(--noir); }
:focus-visible { outline: 1px solid var(--gris); outline-offset: 3px; }
.mono { font-family: var(--mono); }
.saut { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--blanc); color: var(--noir); padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; }
.saut:focus { top: 16px; }

/* ouverture */
.ouverture { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; border-bottom: 1px solid var(--trait); }
#champ { position: absolute; inset: 0; width: 100%; height: 100%; }
.ouverture-texte { position: absolute; left: 0; right: 0; bottom: 15vh; text-align: center; padding: 0 24px;
  opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--lent), transform 1.4s var(--lent); }
.ouverture.fini .ouverture-texte { opacity: 1; transform: none; }
.badge { position: relative; display: inline-flex; align-items: center; justify-content: center; font: 13px var(--mono); color: var(--blanc);
  border: 1px solid var(--trait); background: var(--noir); border-radius: 999px; padding: 6px 14px; margin: 0 0 22px;
  white-space: nowrap; overflow: hidden; box-sizing: border-box; transition: width .6s var(--lent); }
/* le badge change de langue (badge.js) : la mesure sert à connaître la largeur de la phrase suivante */
.badge-mesure { position: absolute; visibility: hidden; white-space: nowrap; left: 0; top: 0; }
.lecteur { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ouverture h1 { font-family: var(--titre); font-weight: 700; font-size: 52px; line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 16px; }
.sous { color: var(--gris); margin: 0 auto 28px; max-width: 640px; }
.boutons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* barre du site */
.barre-site { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 26px 36px; }
.marque-site { display: inline-flex; align-items: center; gap: 10px; color: var(--blanc); text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.marque-site svg { width: 22px; height: 22px; }
.droite-site { display: flex; align-items: center; gap: 22px; }
.liens-site { display: flex; gap: 30px; font-size: 14px; }
.liens-site a { position: relative; color: var(--gris); text-decoration: none; transition: color .6s var(--lent); }
.liens-site a:hover, .liens-site a:focus-visible { color: var(--blanc); }
/* sous le lien survolé, une ligne de points se trace de gauche à droite */
.liens-site a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
  background: radial-gradient(circle, currentColor .8px, transparent 1.1px) 0 50% / 5px 2px repeat-x;
  clip-path: inset(0 0 0 100%); transition: clip-path .7s var(--lent); }
.liens-site a:hover::after, .liens-site a:focus-visible::after { clip-path: inset(0 0 0 0); }
.liens-site a:last-child { color: var(--blanc); }
.theme { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0 -6px 0 0; cursor: pointer;
  background: none; border: 0; border-radius: 999px; color: var(--gris); transition: color .6s var(--lent); }
.theme:hover, .theme:focus-visible { color: var(--blanc); }
/* langue : « fr en », la langue de la page en blanc, l'autre en gris */
.langues { display: flex; gap: 2px; }
.langues a { font: 13px var(--mono); color: var(--gris); text-decoration: none; padding: 6px 5px; border-radius: 6px; transition: color .6s var(--lent); }
.langues a:hover, .langues a:focus-visible, .langues a[aria-current] { color: var(--blanc); }
.theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme .lune, html[data-theme="clair"] .theme .soleil { display: none; }
html[data-theme="clair"] .theme .lune { display: block; }

/* boutons */
.bouton { display: inline-block; font: 500 16px var(--sans); text-decoration: none; border-radius: var(--r-bouton); padding: 13px 22px; cursor: pointer;
  border: 1px solid transparent;
  transition: background .6s var(--lent), color .6s var(--lent), border-color .6s var(--lent), box-shadow .6s var(--lent); }
.bouton.plein { background: var(--blanc); color: var(--noir); }
.bouton.plein:hover { background: var(--vif); box-shadow: 0 0 0 4px rgba(var(--voile), .08), 0 0 28px rgba(var(--voile), .14); }
.bouton.trait { background: transparent; color: var(--blanc); border-color: var(--trait); }
.bouton.trait:hover { border-color: var(--gris); box-shadow: 0 0 0 4px rgba(var(--voile), .04); }
.bouton.icone { display: inline-grid; place-items: center; padding: 0; width: 52px; height: 52px; }
.bouton.icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* corps de la page : beaucoup d'air, des sections séparées par l'espace plutôt que par des traits */
main { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.section { padding: clamp(112px, 13vw, 184px) 0 0; scroll-margin-top: 24px; }
main > .section:last-child { padding-bottom: clamp(112px, 13vw, 184px); }
.etiquette, .legende { font-size: 13px; color: var(--gris); margin: 0; }
.texte { color: var(--gris); max-width: 560px; margin: 0; }
.texte a, .q a { color: var(--blanc); text-decoration-color: var(--trait); text-underline-offset: 3px; }
.titre-section { font-family: var(--titre); font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.titre-section .n { font-family: var(--mono); font-weight: 400; color: var(--gris); font-size: 13px; letter-spacing: 0; display: block; margin-bottom: 14px; }

/* demander l'accès */
.acces { background: var(--nuit); border: 1px solid var(--trait); border-radius: var(--r-boite); padding: 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; }
.acces-texte .texte { margin-top: 18px; max-width: 340px; }
form { display: flex; flex-direction: column; gap: 22px; }
label, .groupe legend { font-size: 14px; color: var(--gris); }
.groupe legend { padding: 0; margin-bottom: 8px; }
.groupe { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.champ { display: flex; flex-direction: column; gap: 8px; }
input[type="email"], input[type="text"], textarea { font: 16px var(--sans); color: var(--blanc); background: var(--noir); border: 1px solid var(--trait); border-radius: var(--r-bouton);
  padding: 13px 20px; outline: none; transition: border-color .6s var(--lent); width: 100%; }
input[type="email"]:focus, input[type="text"]:focus, textarea:focus { border-color: var(--gris); }
/* même focus pour les deux champs : le trait s'éclaircit, sans contour en plus (la règle :focus-visible générale
   l'emportait sur « textarea » seul et lui ajoutait un second contour) */
input[type="email"]:focus-visible, input[type="text"]:focus-visible, textarea:focus-visible { outline: none; }
textarea { border-radius: 18px; resize: vertical; min-height: 120px; line-height: 1.5; }
input::placeholder { color: var(--gris); opacity: .7; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label { position: relative; cursor: pointer; }
.choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix span { display: inline-block; font-size: 14px; color: var(--gris); border: 1px solid var(--trait); border-radius: 999px; padding: 8px 14px;
  transition: color .6s var(--lent), border-color .6s var(--lent), background .6s var(--lent); }
.choix input:checked + span { color: var(--noir); background: var(--blanc); border-color: var(--blanc); }
.choix input:focus-visible + span { outline: 1px solid var(--gris); outline-offset: 3px; }
.envoi { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.envoi .legende { max-width: 260px; }
.art { font-family: var(--art); font-size: 13px; line-height: 1.2; color: var(--gris); margin: 0; white-space: pre; }
.merci { display: none; }
.acces.envoye form { display: none; }
.acces.envoye .merci { display: block; }
.merci .art { color: var(--blanc); margin-bottom: 16px; }

/* pied */
/* nom, © et langues posés sur la même ligne de base (deux polices : centrer leurs boîtes ne les aligne pas) ;
   les icônes, groupées à droite, sont centrées sur la ligne */
.pied { padding: 28px 36px 32px; border-top: 1px solid var(--trait); display: flex; align-items: baseline; gap: 16px 24px; flex-wrap: wrap; font-size: 13px; color: var(--gris); }
.pied .reseaux { margin-left: auto; display: flex; align-self: center; }
/* textes sur une ligne de la hauteur des icônes (36 px) : leur milieu tombe sur celui des icônes */
.pied .marque-site, .pied .mono, .pied .langues a { line-height: 36px; }
.pied .langues a { padding-top: 0; padding-bottom: 0; }
/* le nom en bloc en ligne (pas en flex) : sa ligne de base est celle du texte, pas le bas du signe */
.pied .marque-site { display: inline-block; font-size: 15px; white-space: nowrap; }
.pied .marque-site svg { width: 16px; height: 16px; vertical-align: middle; margin: 0 10px 0 0; position: relative; top: -1px; }
.pied a { color: var(--gris); text-decoration: none; transition: color .6s var(--lent); }
.pied a:hover { color: var(--blanc); }

/* vue pour les ia : l'icône de robot seule, tout en bas à droite ; au survol, un badge monte au-dessus */
.pied .vue-ia { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid transparent; transition: color .6s var(--lent), border-color .6s var(--lent); }
.pied .vue-ia:hover, .pied .vue-ia:focus-visible { border-color: var(--trait); }
.pied .vue-ia + .vue-ia { margin-left: 8px; } /* icônes côte à côte, 44 px d'axe en axe */
.vue-ia svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vue-ia .bulle { position: absolute; right: 0; bottom: calc(100% + 10px); white-space: nowrap; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--blanc); background: var(--nuit);
  border: 1px solid var(--trait); border-radius: 999px; padding: 7px 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(6px); transition: opacity .7s var(--lent), transform .7s var(--lent); }
html[data-theme="clair"] .vue-ia .bulle { box-shadow: 0 8px 28px rgba(0, 0, 0, .08); }
.vue-ia .bulle i { width: 6px; height: 6px; border-radius: 50%; background: var(--blanc); }
.vue-ia .bulle span { color: var(--gris); }
.vue-ia:hover .bulle, .vue-ia:focus-visible .bulle { opacity: 1; transform: none; }
/* bulle centrée au-dessus de son icône ; celle du bout (le robot, contre le bord droit) reste alignée à droite */
.pied .vue-ia:not(:last-child) .bulle { right: auto; left: 50%; transform: translate(-50%, 6px); }
.pied .vue-ia:not(:last-child):hover .bulle, .pied .vue-ia:not(:last-child):focus-visible .bulle { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  main { padding: 0 32px; }
  .pied { padding: 24px 36px 28px; }
  .acces { grid-template-columns: minmax(0, 1fr); }
  .acces { padding: 48px; gap: 40px; }
  .liens-site a:not(:last-child) { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 0 24px; }
  .section { padding-top: 104px; }
  main > .section:last-child { padding-bottom: 104px; }
  .ouverture h1 { font-size: 30px; line-height: 1.1; margin-bottom: 18px; }
  .ouverture-texte { bottom: 10vh; padding: 0 32px; }
  .badge { margin-bottom: 24px; }
  .sous { font-size: 16px; max-width: 330px; margin-bottom: 34px; text-wrap: balance; }
  .barre-site { padding: 20px 24px; }
  .titre-section { font-size: 28px; }
  .acces { padding: 36px 24px; gap: 32px; }
  /* téléphone : deux lignes calées sur les mêmes bords. En haut le nom et les icônes, en bas le © et les langues ;
     les marges négatives posent le dessin du robot et le « en » sur le bord, pas leur zone tactile */
  .pied { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "marque reseaux" "copie langues";
    align-items: center; row-gap: 2px; padding: 24px 24px 32px; }
  .pied .marque-site { grid-area: marque; justify-self: start; }
  .pied .reseaux { grid-area: reseaux; margin-right: -13px; }
  .pied .mono { grid-area: copie; align-self: baseline; }
  .pied .langues { grid-area: langues; justify-self: end; margin-right: -7px; align-self: baseline; }
  .pied .langues a { min-width: 30px; }
}
/* téléphone : le signe en haut, l'étiquette et le titre au milieu, le bouton en bas, sous le pouce */
@media (max-width: 560px) {
  .ouverture .sous { display: none; }
  .ouverture-texte { bottom: max(32px, 5vh); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
  .ouverture-texte > * { pointer-events: auto; }
  .ouverture h1 { margin-bottom: 0; }
  .boutons { margin: auto auto 0; width: 100%; max-width: 340px; flex-wrap: nowrap; }
  .boutons .plein { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .liens-site a::after, .ouverture-texte, .vue-ia .bulle { transition: none; }
  .badge { transition: none; }
}

/* téléphone : chaque cible tactile fait au moins 44 px de haut (la zone grandit, le dessin ne bouge pas) */
@media (max-width: 900px) {
  .marque-site, .liens-site a, .pied .vue-ia { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .liens-site a::after { bottom: 6px; }
  .theme { width: 44px; height: 44px; margin: 0 -14px 0 -8px; }
  .langues a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 34px; padding: 0; }
  .pied .marque-site { display: inline-block; line-height: 44px; min-height: 44px; }
  .pied .vue-ia + .vue-ia { margin-left: 0; } /* cibles de 44 px côte à côte : les icônes restent à 44 px d'axe en axe */
}
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
