/* Mini-outils — styles communs. Thème repris de capedinvisibilite.fr */

/* Polices hébergées dans le site (dossier polices/, licences SIL OFL jointes) : aucune
   requête vers un service tiers. Fichiers récupérés depuis Google Fonts, sous-ensembles
   latin et latin étendu ; Inter Tight et JetBrains Mono sont des polices variables,
   un même fichier sert plusieurs graisses. */
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-italique-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-italique-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/instrument-serif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --blue: #1136DB;
  --ink: #1B2450;
  --muted: #565D78;
  --cream: #F4EFE3;
  --paper: #FCF9F1;
  --chip: #EBE6D9;
  --line: #E0DACA;
  --on-blue: #F8F3E6;
  --on-blue-muted: #DCE1FA;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.conteneur { max-width: 1560px; margin: 0 auto; padding: 0 32px; }

/* ---------- Menu de gauche (rempli par commun.js) ---------- */
body { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
#menu {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-height: 0;
  background: var(--blue); color: var(--on-blue);
}
#menu :focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; }
.logo {
  display: flex; align-items: center; gap: 10px; padding: 26px 26px 6px;
  color: var(--on-blue); font-size: 20px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none;
}
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { font-weight: inherit; }
.logo span { font-family: var(--serif); font-style: italic; font-weight: 400; }
#menu h2:not(:first-child) { margin-top: 22px; }
.entree-vide { display: block; padding: 5px 12px; font-family: var(--mono); font-size: 11px; color: var(--on-blue-muted); opacity: .75; }
.entree .num svg { display: block; width: 14px; height: 14px; position: relative; top: 2px; }
/* Un nom de logiciel garde sa casse, même dans un libellé en majuscules. */
.nom-propre { text-transform: none; }
.marque-sous {
  display: block; padding: 0 26px 20px; color: var(--on-blue-muted);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
#menu .defile { flex: 1; overflow-y: auto; padding: 0 14px 12px; scrollbar-width: thin; scrollbar-color: rgba(248, 243, 230, .25) transparent; }
#menu h2 {
  margin: 6px 12px 8px; color: var(--on-blue-muted);
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase;
}
.entree {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 7px 12px; border-radius: 999px;
  color: rgba(248, 243, 230, .86); font-size: 14px; text-decoration: none; transition: background .15s, color .15s;
}
.entree .num { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--on-blue-muted); width: 16px; flex: none; }
.entree .lib { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entree:hover { background: rgba(248, 243, 230, .10); color: var(--on-blue); }
.entree[aria-current="page"] { background: var(--cream); color: var(--blue); font-weight: 500; box-shadow: 0 6px 18px rgba(8, 20, 90, .25); }
.entree[aria-current="page"] .num { color: var(--blue); }
#menu .pied {
  padding: 14px 26px 20px; border-top: 1px solid rgba(248, 243, 230, .16); color: var(--on-blue-muted);
  font-family: var(--mono); font-size: 11px; line-height: 2;
}
#menu .pied span { display: block; white-space: nowrap; }
/* Encart slogan en bas du menu, au-dessus du trait : carré à bords arrondis, de la largeur
   du bouton d'installation, sur l'image du bandeau d'accueil. */
.encart-zone { padding: 0 26px 16px; }
.encart {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  aspect-ratio: 1 / 1; padding: 14px; border-radius: 14px; text-decoration: none; color: var(--on-blue);
  background: #1136DB url("images/fond-tempete.jpg") 78% 70% / 230% auto no-repeat;
  border: 1px solid rgba(248, 243, 230, .28);
}
/* Sur un écran peu haut, l'encart céderait sa place aux entrées du menu : on le masque. */
@media (max-height: 1020px) {
  /* Pas assez de hauteur pour un carré : l'encart garde sa largeur et devient un bandeau. */
  .encart { aspect-ratio: 16 / 9; padding: 12px; gap: 5px; }
  .encart strong { font-size: 15px; }
  .encart small { font-size: 11px; }
}
@media (max-height: 920px) { .encart-zone { display: none; } }
.encart::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 110, .15) 0%, rgba(8, 20, 110, .82) 62%); }
.encart strong, .encart small { position: relative; display: block; white-space: normal; }
.encart strong { font-family: var(--sans); font-size: 17px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.encart em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: 0; }
.encart small { font-family: var(--sans); font-size: 12px; line-height: 1.35; color: var(--on-blue-muted); }
#installer {
  display: block; width: 100%; height: 36px; margin: 0 0 12px; padding: 0 14px; cursor: pointer;
  border-radius: 9999px; border: 1px solid rgba(248, 243, 230, .45); background: transparent; color: var(--on-blue);
  font-family: var(--sans); font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
#menu .pied #installer-info { white-space: normal; line-height: 1.5; margin: -4px 0 12px; color: var(--on-blue); }
#installer:hover { background: var(--cream); color: var(--blue); border-color: var(--cream); }
#menu .pied .version { display: block; margin-top: 8px; color: var(--on-blue); letter-spacing: .04em; text-decoration: none; }
#menu .pied .version:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Tout le contenu (hors menu) est affiché à 90 % de sa taille. */
#contenu { min-width: 0; zoom: 0.9; }

/* Ligne en haut de la page, sur toute la largeur, pour la détacher de la barre de titre
   de la fenêtre (application installée) ou du navigateur. Elle reste visible au défilement. */
body::before {
  content: ""; position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 1px;
  background: var(--ink); pointer-events: none;
}
#barre-mobile { display: none; }
.mobile-info, .mobile-seul { display: none; }
#fond { display: none; }

main { padding: 56px 0 72px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--blue); margin: 0 0 14px;
}
h1 {
  font-size: clamp(38px, 5.2vw, 60px); line-height: 1.02; font-weight: 500;
  letter-spacing: -0.035em; color: var(--blue); margin: 0 0 16px;
}
h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-size: 1.08em; }
.lead { font-size: 18px; margin: 0 0 12px; }
.lead strong { font-weight: 500; color: var(--blue); }
.lead + .grille { margin-top: 44px; }

.grille { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; }
.colonne { display: grid; gap: 32px; }

.panel {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(17, 54, 219, .32), 0 2px 6px rgba(27, 36, 80, .05);
  padding: 24px 26px 26px;
}
.panel .eyebrow { margin-bottom: 8px; }
/* Panneaux de saisie : même fond que les autres, avec une bordure bleue pour les distinguer. */
.panel.panel-config { border: 1px solid var(--blue); }

.champ {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.champ:last-child { border-bottom: 0; }
.champ label, .champ .etiquette {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); line-height: 1.4;
}
.champ .aide { display: block; text-transform: none; letter-spacing: 0; font-size: 11px; margin-top: 2px; opacity: .85; }
.champ input[type="text"], .champ input[type="number"], .champ input[type="date"], .champ select {
  width: 100%; height: 38px; padding: 0 12px;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
}
.saisie {
  display: block; width: 100%; min-height: 240px; padding: 12px; resize: vertical;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink); white-space: pre; overflow: auto; tab-size: 12;
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
}
.saisie:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.aide-bloc { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.champ input:focus, .champ select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
/* ---------- Copie réussie : confettis et message ---------- */
.confetti { position: fixed; z-index: 60; pointer-events: none; }
.bravo {
  position: fixed; z-index: 55; left: 50%; bottom: 32px; max-width: calc(100vw - 32px);
  padding: 12px 22px; border-radius: 9999px; background: var(--blue); color: var(--on-blue);
  font-size: 16px; font-weight: 500; text-align: center;
  box-shadow: 0 18px 40px -12px rgba(17, 54, 219, .55);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.bravo.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Bandeau « nouvelle version disponible » ---------- */
.maj {
  position: fixed; z-index: 58; left: 50%; top: 20px; transform: translateX(-50%); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px; border-radius: 9999px;
  background: var(--ink); color: var(--on-blue); font-size: 14px; font-weight: 500;
  box-shadow: 0 18px 40px -12px rgba(27, 36, 80, .55);
}
.maj button {
  font: inherit; height: 32px; padding: 0 14px; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--on-blue); color: var(--blue);
}

/* ---------- Calendrier maison (construit par commun.js) ---------- */
.date-champ { position: relative; display: block; }
.champ .date-champ input { padding-right: 42px; }
.cal-bouton {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; padding: 7px;
  border: 0; border-radius: 50%; background: transparent; color: var(--blue); cursor: pointer;
}
.cal-bouton:hover, .cal-bouton[aria-expanded="true"] { background: var(--blue); color: var(--on-blue); }
.cal-bouton svg { display: block; width: 16px; height: 16px; }
.cal {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 292px; padding: 16px 16px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(17, 54, 219, .38), 0 4px 14px rgba(27, 36, 80, .10);
}
.cal button { font: inherit; border: 0; background: transparent; cursor: pointer; padding: 0; color: inherit; }
.cal button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-titre { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); text-transform: capitalize; white-space: nowrap; }
.cal-titre em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; }
.cal-nav { display: flex; gap: 2px; }
.cal-nav button { width: 26px; height: 26px; border-radius: 50%; color: var(--blue); font-size: 16px; line-height: 1; padding-bottom: 2px; }
.cal-nav button:hover { background: var(--chip); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-jour-nom {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); text-align: center; padding: 6px 0;
}
.cal .cal-jour {
  height: 34px; border-radius: 9999px; font-family: var(--mono); font-size: 13px; color: var(--ink);
  border: 1px solid transparent; transition: background .12s;
}
.cal .cal-jour:hover { background: var(--chip); }
.cal .cal-jour.hors { color: var(--muted); opacity: .5; }
.cal .cal-jour.auj { border-color: rgba(17, 54, 219, .45); color: var(--blue); }
.cal .cal-jour.choisi { background: var(--blue); color: var(--on-blue); font-weight: 500; opacity: 1; border-color: var(--blue); }
.cal-pied { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-pied button { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--blue); padding: 4px 2px; }
.cal-pied button:hover { text-decoration: underline; text-underline-offset: 3px; }

.champ input::placeholder { color: var(--muted); opacity: .6; }
.champ input.erreur { border-color: var(--blue); background: var(--chip); }
.champ input[type="checkbox"] { width: 20px; height: 20px; margin: 9px 0; accent-color: var(--blue); justify-self: start; }
.champ .valeur { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.champ .valeur.code { color: var(--blue); }
.champ.total .valeur { font-family: var(--sans); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); text-align: right; }
.droite { text-align: right; }
.ok { display: inline-block; background: var(--blue); color: var(--on-blue); padding: 2px 12px; border-radius: 9999px; font-weight: 500; }
.ecart { display: inline-block; background: var(--chip); color: var(--ink); padding: 2px 12px; border-radius: 9999px; }

.alertes { margin: 16px 0 0; padding: 0; list-style: none; }
.alertes:empty { display: none; }
.alertes li { background: var(--chip); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.alertes li + li { margin-top: 6px; }

.barre { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.barre .eyebrow { margin: 0; }
.barre .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  height: 38px; padding: 0 18px; border-radius: 9999px; cursor: pointer;
  background: var(--blue); color: var(--on-blue); border: 1px solid var(--blue);
  transition: background .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.btn.ghost { height: 32px; padding: 0 14px; font-size: 13px; background: transparent; color: var(--blue); border-color: rgba(17, 54, 219, .35); }
.btn.ghost:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.etat { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.cadre-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); text-align: left;
  padding: 4px 12px 8px 0; border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 7px 12px 7px 0; font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap;
}
tbody td.num { color: var(--muted); }
tbody td.compte { color: var(--blue); }
tbody td.lib { font-family: var(--sans); font-size: 15px; }
tbody tr.debut td { border-top: 1px solid var(--line); }
tbody tr:first-child.debut td { border-top: 0; }
th.droite, td.droite { text-align: right; padding-right: 0; padding-left: 12px; }
.vide { background: var(--cream); border-radius: 8px; padding: 18px 20px; margin-top: 12px; }

.resultat { font-size: clamp(44px, 6vw, 68px); line-height: 1; font-weight: 500; letter-spacing: -0.035em; color: var(--blue); margin: 6px 0 22px; }
.note { background: var(--cream); border-radius: 8px; padding: 18px 20px; margin: 0; font-size: 16px; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .conteneur {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 28px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

.pied-commun {
  flex-basis: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line);
}
.legal { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.legal a, .projet a { color: var(--ink); text-decoration: none; }
.legal a:hover, .projet a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.projet a { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-left: 4px; }
.projet img { display: block; }

/* ---------- Page d'accueil ---------- */
.accueil h1 { font-size: clamp(42px, 6vw, 72px); }
.accueil .lead { max-width: 760px; font-size: 20px; }
.accueil h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; color: var(--blue); margin: 0 0 8px; }
.accueil h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-size: 1.08em; }
.accueil section { margin-top: 64px; }
.accueil section > p { max-width: 760px; margin: 0 0 20px; }
.boutons { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-top: 28px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn.grand { height: 46px; padding: 0 24px; font-size: 16px; }
.btn.ghost.grand { height: 46px; padding: 0 24px; font-size: 16px; }
.info-installer { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.carte {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 18px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(255, 255, 255, .8); border-radius: 10px;
  box-shadow: 0 20px 40px -28px rgba(17, 54, 219, .32), 0 2px 6px rgba(27, 36, 80, .05);
  transition: box-shadow .15s, transform .15s;
}
a.carte:hover { box-shadow: 0 24px 44px -24px rgba(17, 54, 219, .45), 0 2px 6px rgba(27, 36, 80, .08); transform: translateY(-2px); }
.carte .num { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--blue); }
.carte strong { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); }
.carte span { font-size: 15px; }
.carte .chiffre { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--blue); }
.carte .suite { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--blue); }
.bandeau-bleu { background: var(--blue); color: var(--on-blue); border-radius: 10px; padding: 32px 34px; }
.bandeau-bleu h2 { color: var(--on-blue); }
.bandeau-bleu p { color: var(--on-blue-muted); }
.bandeau-bleu .btn { background: var(--on-blue); color: var(--blue); border-color: var(--on-blue); }
.bandeau-bleu .btn:hover:not(:disabled) { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.bandeau-bleu .info-installer { color: var(--on-blue); }
.bandeau-bleu ul { margin: 0 0 6px; padding-left: 20px; max-width: 760px; }
.bandeau-bleu li { margin: 0 0 4px; }

/* Bandeau final de l'accueil : « Ships in Distress in a Storm » de Peter Monamy (1681-1749),
   Tate T00807, image de Wikimedia Commons passée en camaïeu bleu, dans le style de capedinvisibilite.fr.
   Le voile bleu à gauche garde le texte lisible sur la partie sombre de l'image. */
.final {
  position: relative; overflow: hidden; border-radius: 10px; min-height: 440px;
  display: flex; align-items: center; padding: 48px 44px;
  background: #1136DB url("images/fond-tempete.jpg") center 78% / cover no-repeat;
  color: var(--on-blue);
}
.final::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 20, 110, .72) 0%, rgba(8, 20, 110, .45) 45%, rgba(8, 20, 110, 0) 75%);
}
.final-texte { position: relative; max-width: 620px; }
.accueil .final h2 { color: var(--on-blue); font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; margin: 0 0 14px; }
.accueil .final p { color: var(--on-blue); font-size: 20px; margin: 0; }
.final .btn { background: var(--on-blue); color: var(--blue); border-color: var(--on-blue); }
.final .btn:hover:not(:disabled) { background: var(--cream); border-color: var(--cream); color: var(--ink); }

/* ---------- Pages de texte (mentions légales) ---------- */
/* La colonne de texte est centrée dans la page ; le texte lui-même reste aligné à gauche. */
.conteneur.prose { max-width: 844px; margin: 0 auto; }
.prose h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; color: var(--blue); margin: 40px 0 10px; scroll-margin-top: 24px; }
.prose p { margin: 0 0 10px; }
/* Les liens du texte sont bleus ; pas les boutons, qui gardent leur propre couleur de texte. */
.prose a:not(.btn) { color: var(--blue); text-underline-offset: 3px; }
.version-bloc { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.version-bloc h2 { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.version-bloc .numero { background: var(--blue); color: var(--on-blue); padding: 2px 12px; border-radius: 9999px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.version-bloc ul { margin: 0; padding-left: 20px; }
.version-bloc li { margin: 0 0 4px; }
.prose .cadre-table { margin: 6px 0 14px; }
.prose tbody td { font-family: var(--sans); font-size: 15px; white-space: normal; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody td:last-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.manifeste p, .manifeste li { font-size: 18px; }
.manifeste ul { margin: 0 0 10px; padding-left: 22px; }
.manifeste li { margin: 0 0 6px; }
.manifeste .signature { margin-top: 32px; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--blue); }
.prose .donnee { font-family: var(--mono); font-size: 14px; }

@media (max-width: 1400px) {
  .grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  body { grid-template-columns: minmax(0, 1fr); }
  #menu { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; }
  body.menu-ouvert #menu { transform: none; box-shadow: 0 0 60px rgba(8, 20, 90, .5); }
  body.menu-ouvert #fond { display: block; position: fixed; z-index: 35; inset: 0; background: rgba(27, 36, 80, .35); }
  #barre-mobile {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 5; background: var(--cream);
    color: var(--blue); font-weight: 500; letter-spacing: 0.06em;
  }
  #ouvrir {
    width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--blue); color: var(--on-blue); font-size: 18px; line-height: 1;
  }
  .conteneur { padding: 0 16px; }
  main { padding: 36px 0 48px; }

  /* Téléphone : pages d'information seulement. Les outils disparaissent du menu,
     leurs pages affichent un message, et l'accueil ne propose pas de les ouvrir. */
  #menu .outil, #installer, #installer-info, [data-installer], .info-installer { display: none !important; }
  body.page-outil main { display: none; }
  body.page-outil .mobile-info { display: block; padding: 36px 0 48px; }
  body.page-outil .site-footer .conteneur > span { display: none; }
  .mobile-seul { display: block; }
  a.carte { pointer-events: none; }
  .carte .suite { display: none; }
  .panel { padding: 20px 18px; }
  .final { min-height: 360px; padding: 32px 22px; }
  .final::before { background: rgba(8, 20, 110, .55); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { display: block; }
  #menu, #barre-mobile, .btn { display: none !important; }
}
