/* Socle commun : polices, couleurs, typographie, boutons, pastilles. */

/* Polices hébergées avec le site : aucun appel à un service extérieur. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-stretch: 100%; font-display: swap; src: url(../fonts/bricolage-grotesque.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/jetbrains-mono.woff2) format('woff2'); }

/*
 * Identité « carte topographique » : nuit marine, courbes de niveau, deux couleurs complémentaires.
 * Le bleu-vert porte tout ce qui est cliquable ; l'ambre sert de repère (numéros, puces, courbes maîtresses).
 * Pour changer les couleurs du site, modifier --a1, --a4 et --grad ci-dessous (thème sombre, puis clair).
 */
:root {
  --bg: #080e1c;
  --bg2: #0f1830;
  --carte: rgba(150, 180, 255, .055);
  --bord: rgba(160, 185, 255, .16);
  --trait: rgba(160, 185, 255, .1);
  --txt: #eaf0fb;
  --txt2: #97a5c2;
  --a1: #5b9bff;                 /* accent principal : liens, boutons, survols */
  --a2: #2ee0b5;                 /* accent secondaire : états, fin du dégradé */
  --a3: #ff5d7c;                 /* danger */
  --a4: #ffb84d;                 /* repères : numéros, puces, courbes maîtresses */
  --sur: #04102a;                /* texte posé sur le dégradé */
  --grad: linear-gradient(120deg, #5b9bff, #2ee0b5);
  --panneau: linear-gradient(125deg, #1c47d9, #0c8f9d);   /* grand aplat du bloc contact */
  --sur-panneau: #ffffff;
  --halo: color-mix(in srgb, var(--a1) 38%, transparent);
  --rayon: 14px;
  --ombre: 0 22px 50px rgba(2, 6, 18, .55);
  --ft: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --fc: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --elan: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme=light] {
  --bg: #f3f6fc;
  --bg2: #ffffff;
  --carte: rgba(255, 255, 255, .7);
  --bord: rgba(18, 38, 84, .15);
  --trait: rgba(18, 38, 84, .08);
  --txt: #0e1a35;
  --txt2: #53607c;
  --a1: #1f5cf0;
  --a2: #0a8f7f;
  --a3: #c9274b;
  --a4: #c27500;
  --sur: #ffffff;
  --grad: linear-gradient(120deg, #1f5cf0, #0a8794);
  --panneau: linear-gradient(125deg, #173fc4, #0a7f8c);
  --ombre: 0 18px 44px rgba(24, 44, 100, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1100px 620px at 88% -8%, color-mix(in srgb, var(--a1) 17%, transparent), transparent 62%), radial-gradient(900px 560px at -8% 4%, color-mix(in srgb, var(--a2) 9%, transparent), transparent 60%), var(--bg);
  background-repeat: no-repeat;
  color: var(--txt);
  font: 16px/1.65 var(--fc);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--ft); line-height: 1.12; margin: 0; letter-spacing: -.02em; color: var(--txt); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--a1); color: var(--sur); }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; }

.ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--fm); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .78em 1.35em; border-radius: 10px; border: 1px solid var(--bord);
  background: var(--carte); color: var(--txt); font-weight: 600; cursor: pointer;
  transition: transform .2s var(--elan), box-shadow .25s, border-color .25s, background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--a1); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-p { background: var(--grad); border-color: transparent; color: var(--sur); box-shadow: 0 10px 26px -8px var(--halo); }
.btn-p:hover { box-shadow: 0 16px 34px -8px var(--halo); border-color: transparent; }
.btn-ico { padding: .6em; }
.btn-danger:hover { border-color: var(--a3); color: var(--a3); }

.puce {
  display: inline-flex; align-items: center; gap: .45em; padding: .32em .75em; border-radius: 7px;
  border: 1px solid var(--bord); background: var(--carte); font-size: .8rem; color: var(--txt2); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
