/* Idée : un soir à la marina. Fond presque noir, rose néon, titres serrés en capitales, un mot au pinceau.
   Sombre seulement. Un rail à gauche sur ordinateur, une barre en bas sur téléphone. Aucune police chargée : des piles de polices système. */
:root {
  color-scheme: dark;
  --fond: #07050c; --pan: #100b18; --pan2: #1a1226; --creux: #0b0812; --trait: #332446; --bord: #7d5a96;
  --encre: #f8f0f6; --doux: #bfb0cb; --rose: #ff4f9a; --cyan: #3fdbe8; --violet: #b78bff; --orange: #ffa04a; --sur-rose: #24031a;
  --c: var(--rose); --encre2: var(--doux);
  --ok: #83DAA9; --ok-fond: #143626; --doute: #F3C469; --doute-fond: #2c210c; --conflit: #FFA49B; --conflit-fond: #3b1618;
  --titre: "Avenir Next Condensed", "Bahnschrift SemiCondensed", Bahnschrift, "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --main: "Brush Script MT", "Brush Script Std", "Segoe Script", "Snell Roundhand", "Dancing Script", cursive;
  --texte: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --rayon: 16px; --barre-bas: 0px;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --appui: 120ms; --sortie: 150ms; --entree: 200ms; --page-sortie: 90ms; --page-entree: 210ms; --glisse: 250ms;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-tap-highlight-color: rgba(255, 79, 154, .16); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--fond); scroll-padding: 16px 0 calc(16px + var(--barre-bas)); }
body { margin: 0; background: radial-gradient(900px 500px at 78% -80px, rgba(58, 15, 74, .4), transparent) no-repeat, var(--fond); color: var(--encre); font: 500 16px/1.5 var(--texte); }
h1, h2, h3, h4, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
form { margin: 0; }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: 800; line-height: 1.1; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(42px, 5vw, 64px); font-weight: 900; line-height: .95; text-transform: uppercase; letter-spacing: -.015em; color: #fff; }
h2 { font-size: 30px; text-transform: uppercase; }
h3 { font-size: 24px; }
a { color: inherit; text-underline-offset: 4px; }
p a, li > a:only-child { text-decoration-color: var(--rose); }
p, dd, li { overflow-wrap: break-word; }
dd { overflow-wrap: anywhere; }
strong, b { font-weight: 700; }
input, select, button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
h1:focus, section:focus, main:focus, [tabindex="-1"]:focus { outline: none; }
em.b { position: relative; display: inline-block; max-width: 100%; font: 400 1.1em/1 var(--main); color: var(--rose); text-transform: none; letter-spacing: 0; padding: 0 .12em .22em .02em; }
em.b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .17em; background: var(--rose); clip-path: polygon(1% 62%, 26% 22%, 60% 12%, 99% 0, 100% 24%, 66% 46%, 88% 58%, 60% 72%, 22% 100%, 24% 76%, 3% 92%); }
h1 em.b { font-size: .94em; margin-top: .1em; }
.lu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.reserve { position: absolute; }
.ic { width: 26px; height: 26px; flex: none; }
.ic path, .li path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.c-rose { --c: var(--rose); } .c-cyan { --c: var(--cyan); } .c-orange { --c: var(--orange); } .c-violet { --c: var(--violet); }

/* la page : rail, colonne */
.site { display: grid; grid-template-columns: calc(104px + max(12px, env(safe-area-inset-left, 0px))) minmax(0, 1fr); min-height: 100vh; }
.rail { z-index: 30; }
.rail-dedans { position: sticky; top: 20px; display: flex; flex-direction: column; align-items: center; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-width: thin; margin: 20px 0 20px max(12px, env(safe-area-inset-left, 0px)); padding: 16px 8px 8px; background: #0a0711; border: 1px solid var(--trait); border-radius: 26px; box-shadow: 0 14px 36px rgba(0, 0, 0, .45); }
.rail-dedans > * { flex: none; }
.logo { display: grid; justify-items: center; gap: 4px; min-width: 44px; min-height: 44px; text-decoration: none; font: 800 18px/1 var(--titre); text-transform: uppercase; text-align: center; }
.logo svg { width: 44px; height: 44px; }
.menu { width: 100%; margin-top: 26px; }
.menu ul { display: grid; gap: 6px; }
.menu ul { isolation: isolate; }
.menu li { position: relative; }
.menu a { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 78px; padding: 8px 4px; border-radius: 18px; text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.15; text-align: center; color: #d6c8e0; }
.menu a:hover { background: var(--pan2); color: #fff; }
.menu a[aria-current] { background: none; color: var(--sur-rose); font-weight: 700; }
/* le bloc rose : un élément par entrée, un seul visible (et un seul nommé) par page, derrière l'entrée */
.ici { position: absolute; inset: 0; border-radius: 18px; background: var(--rose); box-shadow: 0 2px 14px -2px rgba(255, 79, 154, .5); opacity: 0; }
.menu a[aria-current] + .ici { opacity: 1; }
.li { width: 30px; height: 30px; }
.mar { min-width: 0; max-width: 1460px; padding: 20px max(24px, env(safe-area-inset-right, 0px)) 0 16px; }
.evitement { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 14px 18px; background: var(--rose); color: var(--sur-rose); font-weight: 700; border-radius: 10px; }
.evitement:focus { top: 8px; }
.bande { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.bande > section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
noscript .bande { display: block; margin-bottom: 20px; }
section > p { max-width: 70ch; }
.page-texte p, .page-texte dl { max-width: 70ch; }
.discret { color: var(--doux); font-size: 14.5px; }
.note { font-size: 14.5px; color: #d9cde2; }
.vers, .sauts a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--rose); }
.sauts { display: flex; flex-wrap: wrap; gap: 0 22px; }
.avis { border: 1px solid #5b4418; border-left: 5px solid var(--orange); background: #1c1209; border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
p.avis { display: block; max-width: none; }

/* haut de page */
.tete { position: relative; display: grid; overflow: hidden; border-radius: 20px; border: 1px solid var(--trait); background: radial-gradient(600px 300px at 92% 0, #7a1d6655, transparent), linear-gradient(120deg, #0a0510 40%, #2a0d3c 78%, #5a1552); }
.tete > * { grid-area: 1 / 1; }
.tete-fond { position: absolute; inset: 0; }
.tete-img { position: absolute; right: 0; top: 0; width: 66%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.tete-fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0a0510 36%, rgba(10, 5, 16, .86) 49%, rgba(10, 5, 16, .5) 62%, rgba(10, 5, 16, 0) 80%); }
.tete-tx { position: relative; z-index: 1; min-width: 0; max-width: 700px; padding: 14px 30px 28px; }
.tete-image .tete-tx { min-height: 250px; max-width: min(700px, 61%); }
.chapo { max-width: 34em; margin-top: 12px; font-size: 17px; color: #fff; }
.chapo p + p { margin-top: 8px; }
.maj { margin-top: 10px; font-size: 14.5px; color: #eadff0; }
.maj time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tete .note { margin-top: 10px; }
.fil ol { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14.5px; color: #eadff0; }
.fil a, .fil span { display: inline-flex; align-items: center; min-height: 44px; min-width: 24px; }
.fil a { text-decoration-color: var(--rose); }
.fil li { display: inline-flex; align-items: center; }
.fil li + li::before { content: "/"; margin-right: 8px; color: var(--doux); }

/* accueil */
.hero { position: relative; display: grid; }
.hero > * { grid-area: 1 / 1; }
.hero-cadre { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--trait); background: #0a0510; aspect-ratio: 1124 / 468; min-height: 100%; width: 100%; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.hero-cadre::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 5, 16, .85), rgba(10, 5, 16, .69) 38%, rgba(10, 5, 16, .25) 56%, rgba(10, 5, 16, 0) 66%), linear-gradient(rgba(10, 5, 16, 0) 62%, rgba(10, 5, 16, .6)); }
.hero-tx { z-index: 2; min-width: 0; max-width: 690px; padding: 40px 44px; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { font-size: clamp(50px, 6vw, 78px); line-height: .92; }
.hero h1 em.b { display: table; }
.hero .chapo { max-width: 25em; margin-top: 16px; }
.recherche { position: relative; width: 100%; margin-top: auto; padding-top: 18px; }
.loupe { display: flex; align-items: center; background: rgba(10, 7, 17, .95); border: 1.5px solid #c3447f; border-radius: 14px; padding-left: 16px; }
.loupe:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan); }
.loupe .ic { color: var(--rose); }
.loupe input { flex: 1; min-width: 0; min-height: 58px; padding: 0 12px; background: none; border: 0; outline: 0; font-size: 17px; }
.loupe button { margin: 6px; min-height: 46px; padding: 0 24px; border: 0; border-radius: 10px; background: var(--rose); color: var(--sur-rose); font: 800 19px/1 var(--titre); text-transform: uppercase; cursor: pointer; }
.loupe button:hover { background: #ff86ba; }
::placeholder { color: var(--doux); opacity: 1; }
#recherche-resultats { position: absolute; left: 0; right: 0; top: 100%; z-index: 9; margin-top: 8px; max-height: min(70vh, 460px); overflow-y: auto; background: #0a0711; border: 1px solid var(--trait); border-radius: 12px; padding: 4px 16px 12px; box-shadow: 0 18px 40px #000a; }
#recherche-resultats:empty { display: none; }
#recherche-resultats > p { padding-top: 12px; }
.res-titre { font-size: 18px; color: var(--doux); margin-top: 14px; }
.res a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; min-height: 44px; align-items: center; padding: 8px 10px; margin-inline: -10px; border-radius: 8px; text-decoration: none; }
.res a:hover { background: var(--pan2); }
.res-nom { font-weight: 700; }
.res-info { color: var(--orange); font-size: 14.5px; }
.rang h2 + .note { margin-top: 4px; }
.accueil > section { gap: 12px; }

/* cartes d'outils */
.cartes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cartes-q { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panneau { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--pan); border: 1px solid var(--trait); border-radius: var(--rayon); text-decoration: none; }
.panneau:hover { border-color: var(--c); }
.carte-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 70%; background: #1c0a30; }
.cartes-q .carte-img { aspect-ratio: 16 / 8; }
@media (min-width: 1021px) { .cartes-q:not(:has(> :nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cartes-q:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tag { position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 7px; background: var(--c); color: #160312; font-size: 13px; font-weight: 700; line-height: 1.2; }
.t { padding: 12px 14px 14px; }
.t b { display: block; font: 800 23px/1.02 var(--titre); text-transform: uppercase; overflow-wrap: break-word; }
.panneau-texte { display: block; margin-top: 5px; font-size: 14.5px; line-height: 1.35; color: var(--doux); }

/* blocs, listes de l'accueil */
.pan { min-width: 0; padding: 18px; background: var(--pan); border: 1px solid var(--trait); border-radius: var(--rayon); }
.mini { display: grid; place-items: end center; height: 46px; border-radius: 8px; overflow: hidden; background: radial-gradient(46px 30px at 50% 74%, #ffe9b0, #ff8f6b 60%, transparent), linear-gradient(#2c0c4c, #c22a7e 60%, #ff8554 78%, #14061f 79%); }
.mini img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 50% 84%; }
.auto { width: 76px; height: 26px; margin-bottom: 4px; }
.corps, .pneu { fill: #10051c; } .vitre { fill: #ffb59a; } .jante { fill: #c9688a; } .pli { stroke: #7a2a68; stroke-width: 1.5; fill: none; }
.taches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tache { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 54px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 12px; background: var(--creux); text-decoration: none; line-height: 1.25; }
.tache:hover { border-color: var(--rose); background: var(--pan2); }
.tache .ic { color: var(--rose); }
.tache-titre { display: block; font-weight: 700; }
.tache-texte { display: block; margin-top: 2px; font-size: 14px; color: var(--doux); }
.ajouts li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; border-top: 1px solid var(--trait); }
.ajouts li:first-child { border-top: 0; }
.ajouts a { display: inline-flex; align-items: center; min-height: 44px; min-width: 11em; font-weight: 700; text-decoration-color: var(--rose); }
.ajouts span { color: var(--doux); font-size: 15px; }
.bas-de-page { display: flex; flex-direction: column; gap: 6px; }

/* champs, boutons, filtres */
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label, .champ-nom, legend { font-size: 14px; font-weight: 700; color: var(--doux); }
main input[type="search"]:not(#recherche-globale), select { width: 100%; min-width: 0; min-height: 52px; padding: 0 16px; background: #0a0711; border: 1.5px solid var(--bord); border-radius: 12px; font-size: 17px; }
main input[type="search"]:not(#recherche-globale) { border-color: #c3447f; }
select { appearance: none; -webkit-appearance: none; padding-right: 44px; text-overflow: ellipsis; background: linear-gradient(45deg, transparent 50%, var(--rose) 50%) calc(100% - 24px) 22px / 7px 7px no-repeat, linear-gradient(135deg, var(--rose) 50%, transparent 50%) calc(100% - 17px) 22px / 7px 7px no-repeat, #0a0711; }
select:hover, main input[type="search"]:hover { border-color: var(--rose); }
option { background: #100b18; color: var(--encre); }
.bouton { min-height: 46px; padding: 8px 18px; background: transparent; border: 1.5px solid var(--bord); border-radius: 11px; cursor: pointer; font-weight: 700; }
.bouton:hover:not(:disabled) { border-color: var(--rose); background: var(--pan2); }
.bouton:disabled { color: #9b8ba8; border-color: var(--trait); cursor: default; }
.bouton-danger { background: var(--conflit-fond); color: var(--conflit); border-color: currentColor; }
.vide { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; border: 2px dashed var(--trait); border-radius: 12px; }
.cartouche { display: inline-block; padding: 4px 10px; border-radius: 7px; background: var(--orange); color: #1d0d02; font: 700 13px/1.2 var(--texte); }
.remise { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.remise [role="group"] { display: flex; flex-wrap: wrap; gap: 10px; }
.remise [role="group"] p { width: 100%; font-weight: 600; }

/* listes, volets */
dl > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 8px; padding-block: 3px; }
dt { color: var(--doux); }
details { min-width: 0; }
summary { position: relative; display: block; width: fit-content; max-width: 100%; min-height: 44px; padding: 10px 0 10px 32px; line-height: 24px; cursor: pointer; font-weight: 700; color: var(--rose); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 0; top: 9px; width: 22px; font: 700 24px/1 var(--texte); text-align: center; }
details[open] > summary::before { content: "–"; }
summary:hover { color: #ff86ba; }
.puces { list-style: disc; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; max-width: 70ch; }
.puces ::marker { color: var(--rose); }
.puces a { padding-block: 4px; }
.faq { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.faq > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px; background: var(--pan); border: 1px solid var(--trait); border-radius: var(--rayon); }
.faq h3 { font-size: 22px; line-height: 1.15; }
.faq p { max-width: 70ch; }
.carnet { max-width: 60ch; }
.carnet > div { grid-template-columns: 7.5rem minmax(0, 1fr); }


.lettres { display: grid; gap: 14px; }
.lettre { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 18px; background: var(--pan); border: 1px solid var(--trait); border-radius: var(--rayon); }
.lettre h2 { font-size: 56px; line-height: .9; color: var(--rose); }
.lettre ul { display: flex; flex-direction: column; gap: 14px; }
.lettre a { display: inline-block; padding-block: 9px; font: 800 24px/1.1 var(--titre); text-transform: uppercase; text-decoration-color: var(--c); }
.page-texte > section { padding: 20px; background: var(--pan); border: 1px solid var(--trait); border-radius: var(--rayon); }
.page-texte section > h2 { font-size: 26px; }
.page-texte section > h3 { font-size: 21px; margin-top: 6px; }
.fiche-legale dd { white-space: pre-line; }
.a-completer { background: var(--doute-fond); color: var(--doute); font-weight: 700; padding: 1px 7px; border-radius: 4px; border: 1.5px dashed currentColor; }
code { font: .95em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--creux); border: 1px solid var(--trait); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

.pied { margin-top: 40px; border-top: 1px solid var(--trait); padding: 22px 0 30px; color: var(--doux); font-size: 15px; }
.pied-dedans { display: flex; flex-direction: column; gap: 8px; }
.pied p { max-width: 80ch; }
.pied strong { color: var(--encre); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 0 20px; }
.pied-liens a { display: inline-flex; align-items: center; min-height: 44px; }

/* mouvement : couleur, opacité, transform, rien d'autre. Entrée 200 ms, sortie 150 ms, appui 120 ms, rien au-dessus de 300 ms.
   La couleur et l'opacité valent pour tout le monde ; ce qui bouge est sous « no-preference ». */
a, summary, button, select, main input, .case, .tache .ic { transition: color var(--sortie) var(--ease-out), background-color var(--sortie) var(--ease-out), border-color var(--sortie) var(--ease-out), opacity var(--sortie) var(--ease-out); }
:is(a, summary, button, select, main input):hover, .tache:hover .ic { transition-duration: var(--entree); }
a:active, summary:active, button.lg:active { opacity: .75; }
:is(a, summary, button, select, main input):active, .menu li:active > * { transition-duration: var(--appui); }
.panneau:active { border-color: var(--c); opacity: 1; }
.tache:active { border-color: var(--rose); background: var(--pan2); opacity: 1; }
:is(.bouton, .onglets button):active:not(:disabled) { border-color: var(--rose); }
.loupe button:active, .bouton[aria-pressed="true"]:active, .onglets [aria-selected="true"]:active { background: #ff86ba; }
.ici { transition: opacity var(--sortie) var(--ease-out); }
.menu a:active { opacity: 1; }
.menu a:not([aria-current]):active { background: var(--pan2); color: #fff; }
/* un volet qui s'ouvre, les résultats de la recherche : un fondu, la fermeture est sèche */
details[open]::details-content { transition: opacity var(--entree) var(--ease-out); }
details:not([open])::details-content { opacity: 0; }
#recherche-resultats { transition: opacity var(--sortie) var(--ease-out), transform var(--sortie) var(--ease-out); }
@starting-style { #recherche-resultats { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) {
  .menu li > *, .logo, .panneau, .tache, .tache .ic, .res a, .vers, .sauts a, button { transition-property: color, background-color, border-color, opacity, transform; }
  .menu li:active > *, :is(.logo, .panneau, .tache, .res a, .vers, .sauts a, button:not(:disabled)):active { transform: scale(.97); }
  .li { transition: transform var(--sortie) var(--ease-out); }
  .carte-img { transform-origin: 50% 100%; transition: transform var(--sortie) var(--ease-out); }
  @starting-style { #recherche-resultats { transform: translateY(-4px); } }
  @media (hover: hover) and (pointer: fine) {
    .menu a:hover .li { transform: translateY(-2px) scale(1.08); transition-duration: var(--entree); }
    .panneau:hover:not(:active) { transform: translateY(-3px); }
    /* sous un outil, la carte reste à sa place : seule son image répond, dans son cadre */
    section[id$="proches"] .panneau:hover:not(:active) { transform: none; }
    .panneau:hover .carte-img { transform: scale(1.04); transition-duration: 250ms; }
    .tache:hover .ic { transform: translateX(2px); }
  }
  /* d'une page à l'autre (Chrome, Safari ; ailleurs la page change, c'est tout). Le rail ne bouge pas, le bloc rose glisse.
     Un nom en double annule tout : le bloc n'est nommé que sur l'entrée en cours, une par page au plus. */
  @view-transition { navigation: auto; }
  .rail-dedans { view-transition-name: rail; }
  .menu a[aria-current] + .ici { view-transition-name: ici; }
  .menu li:nth-child(1) a { view-transition-name: entree-1; }
  .menu li:nth-child(2) a { view-transition-name: entree-2; }
  .menu li:nth-child(3) a { view-transition-name: entree-3; }
  .menu li:nth-child(4) a { view-transition-name: entree-4; }
  .menu li:nth-child(5) a { view-transition-name: entree-5; }
  .menu li:nth-child(6) a { view-transition-name: entree-6; }
  .menu li:nth-child(7) a { view-transition-name: entree-7; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: var(--glisse); animation-timing-function: var(--ease-in-out); }
  /* la page : l'ancienne s'efface (90 ms), puis la nouvelle arrive (210 ms) ; jamais les deux à la fois. Fond de page derrière, sans mélange. */
  ::view-transition { background: var(--fond); }
  ::view-transition-image-pair(root) { isolation: auto; }
  /* le navigateur ajoute le mélange « plus-lighter » par une animation : on remplace ses deux animations par ces fondus, sans mélange */
  @keyframes page-sort { to { opacity: 0; } }
  @keyframes page-entre { from { opacity: 0; } }
  ::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; animation-timing-function: var(--ease-out); animation-fill-mode: both; }
  ::view-transition-group(root) { animation-duration: var(--page-entree); }
  ::view-transition-old(root) { animation-name: page-sort; animation-duration: var(--page-sortie); }
  ::view-transition-new(root) { animation-name: page-entre; animation-duration: var(--page-entree); animation-delay: var(--page-sortie); }
  ::view-transition-group(rail) { animation: none; }
  ::view-transition-old(rail) { display: none; }
  ::view-transition-new(rail) { animation: none; }
  ::view-transition-old(ici), ::view-transition-new(ici) { width: 100%; height: 100%; animation-duration: var(--sortie); animation-timing-function: var(--ease-out); }
}

@media (min-width: 641px) and (max-width: 1240px) { .cartes:not(.cartes-q) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* sept outils : le premier prend deux places sur quatre colonnes, ou toute la ligne sur trois */
@media (min-width: 641px) { .cartes:not(.cartes-q):has(> li:nth-child(7):last-child) > li:first-child .carte-img { flex: 1 1 auto; min-height: 0; aspect-ratio: 8 / 3; } }
@media (min-width: 1241px) {
  .cartes:not(.cartes-q):has(> li:nth-child(7):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cartes:not(.cartes-q):has(> li:nth-child(7):last-child) > li:first-child { grid-column: span 2; }
}
@media (min-width: 641px) and (max-width: 1240px) { .cartes:not(.cartes-q):has(> li:nth-child(7):last-child) > li:first-child { grid-column: 1 / -1; } }
/* huit outils : deux lignes de quatre ; sur trois colonnes, le premier prend deux places */
@media (min-width: 1241px) { .cartes:not(.cartes-q):has(> li:nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 641px) and (max-width: 1240px) {
  .cartes:not(.cartes-q):has(> li:nth-child(8):last-child) > li:first-child { grid-column: span 2; }
  .cartes:not(.cartes-q):has(> li:nth-child(8):last-child) > li:first-child .carte-img { flex: 1 1 auto; min-height: 0; aspect-ratio: 8 / 3; }
}
/* neuf outils : trois lignes de trois (de 641 à 1240 px, la grille a déjà trois colonnes) */
@media (min-width: 1241px) { .cartes:not(.cartes-q):has(> li:nth-child(9):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1020px) {
  .cartes-q { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-cadre { aspect-ratio: 1124 / 640; }
  .hero-cadre::after { background: linear-gradient(90deg, rgba(10, 5, 16, .88), rgba(10, 5, 16, .82) 56%, rgba(10, 5, 16, .4) 76%, rgba(10, 5, 16, 0) 92%), linear-gradient(rgba(10, 5, 16, 0) 62%, rgba(10, 5, 16, .6)); }
  .hero .chapo { max-width: 22em; }
  .tete-image .tete-tx { max-width: 68%; }
  .tete-image h1 { font-size: 44px; }
  .fil li:last-child { display: none; }
  .tete-img { width: 60%; }
  .tete-fond::after { background: linear-gradient(90deg, #0a0510 41%, rgba(10, 5, 16, .86) 56%, rgba(10, 5, 16, .45) 70%, rgba(10, 5, 16, 0) 92%); }
}
@media (max-width: 640px) {
  /* la barre : 78 px de haut, détachée du bord ; --barre-bas = sa hauteur, son écart et 8 px d'air */
  :root { --barre-ecart: max(10px, env(safe-area-inset-bottom, 0px)); --barre-bas: calc(86px + var(--barre-ecart)); }
  .site { display: block; }
  .rail-dedans { position: static; max-height: none; overflow: visible; align-items: flex-start; margin: 0; padding: 8px 16px 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .logo { display: flex; align-items: center; gap: 10px; font-size: 23px; }
  .logo svg { width: 34px; height: 34px; }
  .menu { position: fixed; z-index: 40; view-transition-name: rail; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: var(--barre-ecart); width: auto; margin: 0; padding: 6px; background: #0a0711; border: 1px solid var(--trait); border-radius: 24px; box-shadow: 0 10px 28px rgba(0, 0, 0, .55); }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .menu { background: rgba(10, 7, 17, .84); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
    ::view-transition-group(rail) { border-radius: 24px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  }
  @media (prefers-reduced-transparency: reduce) { .menu { background: #0a0711; } }
  .rail-dedans { view-transition-name: none; }
  .menu ul { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
  .menu a { min-height: 60px; padding: 5px 1px; font-size: 12px; line-height: 1.1; gap: 3px; align-content: start; }
  .li { width: 25px; height: 25px; }
  .mar { padding: 8px 16px var(--barre-bas); }
  /* sous la barre, la page se fond dans le fond : rien ne se lit derrière, aucun toucher pris */
  body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: var(--barre-bas); z-index: 35; pointer-events: none; background: linear-gradient(to bottom, rgba(7, 5, 12, 0), var(--fond) 70%); }
  .bande { gap: 22px; }
  h1, .tete-image h1 { font-size: 42px; }
  .tete:not(.tete-image) h1 { font-size: min(42px, 9vw); }
  h2 { font-size: 28px; }
  .tete-tx, .tete-image .tete-tx { max-width: none; padding: 6px 16px 20px; }
  .tete-image .tete-tx { min-height: 0; padding-bottom: 164px; }
  .tete-img { top: auto; bottom: 0; width: 100%; height: 172px; }
  .tete-fond::after { background: linear-gradient(0deg, rgba(10, 5, 16, 0) 104px, rgba(10, 5, 16, .92) 154px, #0a0510 171px); }
  .chapo { font-size: 16px; line-height: 1.42; margin-top: 10px; }
  .hero-cadre { aspect-ratio: auto; border-radius: 18px; }
  .hero-img { inset: auto 0 52px 0; height: 372px; object-position: 100% 50%; }
  .hero-cadre::after { background: linear-gradient(#0a0510 calc(100% - 424px), rgba(10, 5, 16, .72) calc(100% - 364px), rgba(10, 5, 16, 0) calc(100% - 260px), rgba(10, 5, 16, 0) calc(100% - 110px), #0a0510 calc(100% - 54px)); }
  .hero-tx { min-height: 590px; padding: 20px 16px 16px; }
  .hero h1 { font-size: 45px; }
  .hero h1 em.b { font-size: .86em; }
  .hero .chapo { max-width: 25em; margin-top: 10px; }
  .loupe { padding-left: 12px; }
  .loupe input { min-height: 54px; padding: 0 8px; }
  .loupe button { padding: 0 14px; font-size: 17px; }
  .cartes, .cartes-q { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cartes:not(.cartes-q) > li:first-child:nth-last-child(odd), .cartes-q > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cartes:not(.cartes-q) > li:first-child:nth-last-child(odd) .carte-img { aspect-ratio: 16 / 9; }
  .t { padding: 10px 12px 12px; }
  .t b { font-size: 21px; }
  .tag { left: 8px; top: 8px; }
  .pan { padding: 16px; }
  .taches { grid-template-columns: 1fr; }
  .faq > div { padding: 16px; }
  .lettre { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; }
  .lettre h2 { font-size: 46px; }
  .page-texte > section { padding: 16px; }
}
/* téléphone étroit : le nom le plus long, en gras, tient dans le bloc rose */
@media (max-width: 400px) {
  .menu { left: 8px; right: 8px; padding: 5px; }
  .menu ul { gap: 0; }
  .menu a { letter-spacing: -.04em; }
}
@media (max-width: 374px) { .menu a { font-size: 11.5px; letter-spacing: -.05em; } }
@media (max-width: 350px) {
  .menu { left: 6px; right: 6px; }
  .menu a { font-size: 11px; }
}
/* écran bas : sur téléphone couché, l'icône à côté du nom ; dans une fenêtre basse, le rail se serre, puis défile */
@media (min-width: 540px) and (max-width: 640px) and (max-height: 420px) {
  :root { --barre-bas: calc(68px + var(--barre-ecart)); }
  .menu a { grid-auto-flow: column; justify-content: center; align-content: center; align-items: center; gap: 6px; min-height: 46px; text-align: left; }
  .li { width: 22px; height: 22px; }
}
@media (min-width: 641px) and (max-height: 620px) {
  .rail-dedans { top: 8px; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); margin-block: 8px; padding-top: 10px; }
  .menu { margin-top: 10px; }
  .menu a { min-height: 64px; padding-block: 4px; }
  .menu a, .menu a[aria-current] + .ici { view-transition-name: none !important; }
}
