/* DESIGN MAGAZINE: the 404 and the legal pages (mockup 12 « L'adresse perdue », validated 01/10). Tokens of main.css,
   Familjen Grotesk + Source Serif 4. Loaded on the 404 and the 4 legal pages only (inc/design-legal.php). */

/* ---------- 404 ---------- */
.dl-404 { position: relative; overflow: hidden; display: grid; place-items: center; min-height: calc(100vh - var(--haut-entete, 68px)); padding: clamp(2rem, 6vw, 5rem) 0; background: var(--platre); }
.dl-404__grille { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.dl-404__cote { display: block; width: 100%; max-width: 34rem; margin-bottom: 1rem; }
.dl-404__cote line { stroke: var(--bleu); stroke-width: 2; }
.dl-404__cote text { font: 500 104px var(--sans); fill: var(--anthracite); letter-spacing: -6px; }
.dl-404__cote .dl-trait { stroke-dasharray: 1; stroke-dashoffset: 0; }
.dl-404 h1 { margin: 0; font: 300 clamp(2.8rem, 7vw, 6rem)/0.95 var(--serif); letter-spacing: -0.035em; text-wrap: balance; }
.dl-404 h1 em { color: var(--bleu); }
.dl-404__chap { max-width: 30rem; margin: 1.2rem 0 1.6rem; font: 400 1.2rem/1.5 var(--serif); }
.dl-404__form { position: relative; max-width: 32rem; }
.dl-404__form label { display: block; margin-bottom: 0.5rem; font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--feutre); }
.dl-404__champ { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.3rem 0.3rem 1.1rem; border: 1.5px solid var(--anthracite); border-radius: 999px; background: #fff; }
.dl-404__champ svg { flex: none; width: 1.2rem; height: 1.2rem; fill: none; stroke: var(--anthracite); stroke-width: 1.8; }
.dl-404__champ input { flex: 1; min-width: 0; padding: 0.55rem 0; border: 0; outline: 0; background: none; font: 400 1.05rem var(--sans); color: var(--anthracite); }
.dl-404__champ button { min-height: 44px; padding: 0 1.2rem; border: 0; border-radius: 999px; background: var(--anthracite); color: var(--blanc); font: 600 0.9rem var(--sans); cursor: pointer; }
.dl-404__champ button:hover { background: var(--moutarde); color: var(--anthracite); }
.dl-404__champ:focus-within { outline: 3px solid var(--moutarde); outline-offset: 2px; }
.dl-404__propos { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; margin: 0.4rem 0 0; padding: 0.4rem; list-style: none; background: #fff; border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre); }
.dl-404__propos a { display: block; padding: 0.6rem 0.8rem; border-radius: 8px; color: var(--anthracite); text-decoration: none; font: 500 0.98rem/1.3 var(--sans); }
.dl-404__propos a:hover, .dl-404__propos a[aria-selected="true"] { background: var(--platre); }
.dl-404__propos mark { background: var(--moutarde-voile); color: inherit; }
.dl-404__propos li.dl-vide-liste { padding: 0.6rem 0.8rem; color: var(--feutre); }
.dl-404__bulles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.dl-404__bulles a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1.5px solid var(--anthracite); border-radius: 999px; background: var(--blanc); color: var(--anthracite); text-decoration: none; font: 600 0.92rem var(--sans); white-space: nowrap; }
.dl-404__bulles a:hover { background: var(--anthracite); color: var(--blanc); }
.dl-404__plan { position: relative; justify-self: end; width: 100%; max-width: 30rem; aspect-ratio: 1; }
.dl-404__plan svg { width: 100%; height: 100%; }
.dl-404__plan .dl-mur { fill: none; stroke: var(--anthracite); stroke-width: 5; }
.dl-404__plan .dl-porte { fill: none; stroke: var(--bleu); stroke-width: 2; stroke-dasharray: 4 5; }
.dl-404__plan .dl-canape { fill: var(--moutarde-voile); stroke: var(--bleu); stroke-width: 2; }
.dl-404__plan .dl-vide { fill: none; stroke: var(--feutre); stroke-width: 1.5; stroke-dasharray: 6 6; }
.dl-404__plan text { font: 600 13px var(--sans); fill: var(--feutre); letter-spacing: 0.06em; }
.dl-404__plan .dl-q { font: italic 300 64px var(--serif); fill: var(--bleu); }
.dl-anim .dl-404__cote .dl-trait { stroke-dashoffset: 1; animation: dl-trace 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) 0.2s forwards; }
.dl-anim .dl-404__plan .dl-flotte { animation: dl-flotte 6s ease-in-out infinite; }
@keyframes dl-trace { to { stroke-dashoffset: 0; } }
@keyframes dl-flotte { 50% { transform: translate(10px, -8px) rotate(2deg); } }
.dl-suite { padding-block: 3rem; background: var(--blanc); }
.dl-suite h2 { margin: 0 0 1.2rem; font: 400 clamp(1.6rem, 1.3rem + 1vw, 2rem)/1.1 var(--serif); letter-spacing: -0.015em; }
.dl-suite__grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.dl-suite__carte { display: grid; gap: 0.45rem; align-content: start; color: var(--anthracite); text-decoration: none; }
.dl-suite__photo { display: block; overflow: hidden; border-radius: 4px; background: var(--platre-2); }
.dl-suite__photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.dl-suite__rubrique { font: 600 0.7rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bleu); }
.dl-suite__titre { font: 500 1.12rem/1.3 var(--serif); }
.dl-suite__carte:hover .dl-suite__titre { text-decoration: underline; text-decoration-color: var(--moutarde); text-underline-offset: 0.16em; }
.dl-suite__meta { font: 400 0.85rem/1.3 var(--sans); color: var(--feutre); }

/* ---------- Legal pages: a numbered document, sticky contents (the texts are untouched) ---------- */
.dl-legal .page-standard__tete { max-width: none; padding: clamp(1rem, 3vw, 2rem) 0 1.4rem; }
.dl-legal .page-standard__tete h1 { margin: 0.4rem 0 1rem; font: 300 clamp(2.6rem, 6vw, 5rem)/1 var(--serif); letter-spacing: -0.03em; text-wrap: balance; }
.dl-legal .page-standard__tete .chapeau { max-width: 44rem; font: 400 1.12rem/1.55 var(--serif); }
.dl-autres { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 0 2rem !important; border-bottom: 1px solid var(--anthracite); }
.dl-autres a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.85rem; border: 1px solid var(--trait); border-radius: 999px; background: #fff; color: var(--anthracite); text-decoration: none; font: 600 0.82rem var(--sans); }
.dl-autres a:hover { border-color: var(--anthracite); }
.dl-autres a[aria-current] { background: var(--anthracite); border-color: var(--anthracite); color: var(--blanc); }
.dl-legal .dl-autres { margin-inline: 0; padding-inline: 0 !important; max-width: none; }
.dl-grille { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 4rem; padding-block: 2.6rem 4rem; }
.dl-sommaire { position: sticky; top: calc(var(--haut-entete, 68px) + 1.4rem); align-self: start; max-height: calc(100vh - var(--haut-entete, 68px) - 2.8rem); overflow: auto; scrollbar-width: thin; }
.dl-sommaire > p { margin: 0 0 0.6rem; font: 600 0.7rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--feutre); }
.dl-sommaire ol { margin: 0; padding: 0; list-style: none; counter-reset: dl-n; }
.dl-sommaire a { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); padding: 0.36rem 0; color: var(--feutre); text-decoration: none; font: 400 0.88rem/1.35 var(--sans); }
.dl-sommaire a::before { counter-increment: dl-n; content: counter(dl-n, decimal-leading-zero); font-weight: 600; color: var(--trait); }
.dl-sommaire a:hover, .dl-sommaire a.dl-ici { color: var(--anthracite); }
.dl-sommaire a.dl-ici::before { color: var(--bleu); }
.dl-grille .texte-long { max-width: 46rem; margin: 0; counter-reset: dl-s; font-family: var(--serif); }
.dl-grille .texte-long > h2 { counter-increment: dl-s; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: baseline; margin: 1.8rem 0 0.8rem; padding-top: 1.8rem; border-top: 1px solid var(--trait); scroll-margin-top: calc(var(--haut-entete, 68px) + 1.2rem); font: 400 1.6rem/1.15 var(--serif); letter-spacing: -0.01em; }
.dl-grille .texte-long > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dl-grille .texte-long > h2::before { content: counter(dl-s, decimal-leading-zero); font: 300 2.2rem/1 var(--serif); color: var(--bleu); }
.dl-grille .texte-long > :not(h2) { margin-left: 4.4rem; }
.dl-grille .texte-long ul { padding-left: 1.1rem; }
.dl-grille .texte-long ul > li::marker { content: "■  "; font-size: 0.55em; color: var(--moutarde); }
.dl-grille .texte-long .page-service__maj { margin-top: 1.6rem; }
.dl-haut { display: none; }

@media (max-width: 900px) {
  .dl-404 { min-height: auto; place-items: start; }
  .dl-404__grille { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .dl-404__plan { order: -1; justify-self: stretch; width: auto; max-width: none; aspect-ratio: 16 / 10; margin-inline: calc(-1 * var(--gutter)); }
  .dl-404 h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .dl-404__cote { max-width: 15rem; margin-bottom: 0.6rem; }
  .dl-404__champ { padding: 0.3rem 0.3rem 0.3rem 0.9rem; border-radius: 14px; }
  .dl-404__champ button { padding: 0 1rem; border-radius: 10px; }
  .dl-404__bulles { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .dl-404__bulles::-webkit-scrollbar { display: none; }
  .dl-suite__grille { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .dl-suite__carte { scroll-snap-align: start; }
  .dl-grille { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .dl-sommaire { position: sticky; top: var(--haut-entete, 60px); z-index: 10; max-height: none; overflow: visible; margin-inline: calc(-1 * var(--gutter)); padding: 0.6rem var(--gutter); background: var(--blanc); border-bottom: 1px solid var(--trait); }
  .dl-sommaire > p { display: none; }
  .dl-sommaire ol { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; }
  .dl-sommaire ol::-webkit-scrollbar { display: none; }
  .dl-sommaire li { flex: none; }
  .dl-sommaire a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.8rem; border: 1px solid var(--trait); border-radius: 999px; background: #fff; white-space: nowrap; font-size: 0.82rem; }
  .dl-sommaire a::before { content: none; }
  .dl-sommaire a.dl-ici { background: var(--anthracite); border-color: var(--anthracite); color: var(--blanc); }
  .dl-grille .texte-long > h2 { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; margin-top: 1.6rem; padding-top: 1.6rem; }
  .dl-grille .texte-long > h2::before { font-size: 1.4rem; }
  .dl-grille .texte-long > :not(h2) { margin-left: 0; }
  .dl-haut { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--anthracite); color: var(--blanc); text-decoration: none; font: 600 1.1rem var(--sans); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
}
@media (prefers-reduced-motion: reduce) {
  .dl-anim .dl-404__cote .dl-trait { animation: none; stroke-dashoffset: 0; }
  .dl-anim .dl-404__plan .dl-flotte { animation: none; }
}
