/* ============================================================================
   Pages d'erreur, maintenance, construction et pages légales
   ----------------------------------------------------------------------------
   Feuille propre à ce groupe de pages : elle se charge APRÈS akame-ui.css et
   n'emploie que les jetons de body.ak (--ak-bg, --ak-acc, --ak-ease…). Classes
   préfixées « ak- », CSS ordinaire : rien ne dépend d'une recompilation de
   Tailwind. Mouvement doux : transform / opacity seulement, tout s'arrête avec
   prefers-reduced-motion, et tout reste visible sans JavaScript.
   ========================================================================== */

/* ───────── Menu de bureau ─────────
   Ces pages ne chargent pas site.css : on reprend ici ses règles du menu. Sans elles, « À propos » et
   « Espace client » passent sur deux lignes entre 1024 et 1279 px, et le menu « Prestations » ne
   s'ouvrirait pas (ni survol, ni clavier : pas de site.js non plus). */
.nav-dropdown:hover > .nav-dropdown-panel, .nav-dropdown:focus-within > .nav-dropdown-panel { display: block; }
@media (min-width: 1024px) {
	#navbar .nav-link, #navbar #nav-logo, #navbar a.rounded-full { white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
	#navbar a[aria-label^="Instagram"], #navbar a[aria-label*="YouTube"] { display: none; }
}

/* ───────── Cibles tactiles et contraste du décor commun (menu, fil d'Ariane, pied de page) ─────────
   Les liens du pied de page, le logo et le fil d'Ariane gardent leur taille, mais leur zone cliquable atteint
   44 px de haut ; les liens du menu de bureau et ses pictogrammes de réseaux gagnent en hauteur (la barre fait
   64 à 80 px, rien ne bouge). Le fil d'Ariane passe de 40 % à 58 % de blanc : 12 px de texte exigent 4,5:1. */
.ak .ak-fl, .ak .ak-fbar a, .ak .ak-zn a.t, .ak .ak-logo, .ak nav[aria-label="Fil d'Ariane"] a { position: relative; }
.ak .ak-fl::after, .ak .ak-fbar a::after, .ak .ak-zn a.t::after, .ak nav[aria-label="Fil d'Ariane"] a::after { content: ''; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
.ak .ak-logo::after { content: ''; position: absolute; inset: -2px -6px; }
.ak nav[aria-label="Fil d'Ariane"] ol { color: var(--ak-dim); }
.ak #navbar .nav-link { padding-top: 12px; padding-bottom: 12px; }
.ak .nav-link::after { bottom: 9px; }
.ak #navbar a[aria-label^="Instagram"], .ak #navbar a[aria-label*="YouTube"] { width: 44px; height: 44px; }
.ak .nav-dropdown-panel a { padding-top: 12px; padding-bottom: 12px; }

/* ───────── Viseur de page (quatre coins, comme l'en-tête des sous-pages) ───────── */
.ak-vf-pg { inset: 96px clamp(12px, 2vw, 28px) 24px; z-index: 2; opacity: .55; animation: akFade 1.3s var(--ak-ease) .3s backwards; }

/* ───────── Page d'état : erreur, maintenance, construction ─────────
   Un grand code en filigrane (le h1 des pages d'erreur), puis, par-dessus : étiquette,
   titre, message, boutons. Le code est derrière le texte (z-index négatif dans un
   contexte d'empilement propre à la section). */
.ak-err { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 640px; min-height: max(640px, 100vh); min-height: max(640px, 100svh); padding: 132px 0 104px; background: radial-gradient(68% 56% at 50% 46%, rgba(24, 191, 239, .055), transparent 72%); }
.ak-err-in { position: relative; width: 100%; max-width: 860px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); text-align: center; }
.ak-err-code { position: absolute; z-index: -1; inset: 132px 0 104px; margin: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(132px, 40vw, 560px); padding-right: .035em; font-weight: 800; letter-spacing: -.035em; line-height: .8; text-transform: uppercase; white-space: nowrap; color: rgba(242, 244, 245, .07); -webkit-text-stroke: 0; -webkit-mask-image: linear-gradient(to bottom, #000 38%, rgba(0, 0, 0, .25) 100%); mask-image: linear-gradient(to bottom, #000 38%, rgba(0, 0, 0, .25) 100%); user-select: none; pointer-events: none; animation: akFade 1.8s var(--ak-ease) .1s backwards; }
/* Page « en construction » : le chronomètre à zéro se pose au-dessus du texte (il n'a pas la masse d'un « 404 »,
   et derrière le message il gênerait la lecture). */
.ak-err-col { flex-direction: column; }
.ak-err-code.ak-tcode { position: relative; inset: auto; width: 100%; margin-bottom: .14em; font-size: clamp(52px, 15vw, 230px); padding-right: .03em; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ak-err .ak-eb { display: inline-flex; justify-content: center; }
.ak-err .ak-eb::after { content: ''; width: 36px; height: 1px; background: currentColor; }
.ak-err .ak-rec { margin-right: -2px; }
.ak-err-t { margin-top: 20px; font-size: clamp(36px, 4.6vw, 66px); }
.ak-err-t .ak-ln-in { animation: akLn 1s var(--ak-ease) .12s backwards; }
.ak-err .ak-sub { margin: 24px auto 0; text-wrap: balance; }
.ak-err .ak-cta-row { justify-content: center; }

/* ───────── Pages légales : en-tête ───────── */
.ak-lh { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 104px) 0 clamp(52px, 6vw, 88px); border-bottom: 1px solid var(--ak-line); }
.ak-lh .ak-vf-pg { inset: 20px clamp(12px, 2vw, 28px); }
.ak-lh-t { margin: 20px 0 0; font-size: clamp(36px, 7.2vw, 112px); line-height: .98; letter-spacing: -.045em; font-weight: 700; color: #fff; text-wrap: balance; overflow-wrap: break-word; }
.ak-lh-t em { font-family: var(--ak-serif); font-style: italic; font-weight: 300; letter-spacing: 0; color: var(--ak-acc); font-size: .8em; }

/* ───────── Pages légales : texte de lecture ───────── */
.ak-doc { position: relative; padding: clamp(48px, 6vw, 96px) 0 clamp(72px, 9vw, 140px); }
.ak-doc-g { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 860px); justify-content: center; align-items: start; gap: clamp(40px, 6vw, 96px); }

/* Sommaire */
.ak-toc { position: sticky; top: 104px; }
.ak-toc-t { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ak-ink); }
.ak-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--ak-line); }
.ak-toc a { position: relative; display: flex; align-items: baseline; gap: .55em; min-height: 44px; padding: 10px 0 10px 18px; font-size: 14.5px; line-height: 1.35; color: var(--ak-mute); transition: color .3s; }
.ak-toc a::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; background: var(--ak-acc); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ak-ease); }
.ak-toc a:hover, .ak-toc a:focus-visible { color: var(--ak-ink); }
.ak-toc a:hover::before, .ak-toc a:focus-visible::before { transform: scaleY(1); }
.ak-toc .ak-n { flex: none; color: var(--ak-acc); font-variant-numeric: tabular-nums; }
/* Section en cours de lecture (akame-ui.js pose aria-current="true") : même repère que le survol, sans mouvement en plus. */
.ak-toc a[aria-current="true"] { color: var(--ak-ink); }
.ak-toc a[aria-current="true"]::before { transform: scaleY(1); }

/* Corps du texte */
.ak-prose { min-width: 0; }
.ak-ls { position: relative; margin-top: clamp(36px, 4.4vw, 56px); padding-top: clamp(36px, 4.4vw, 56px); border-top: 1px solid var(--ak-line); scroll-margin-top: 104px; }
.ak-ls:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
body.ak main .ak-doc .ak-ls h2:not(.ak-h2) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .5em; align-items: baseline; margin: 0 0 22px; font-size: clamp(25px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 600; color: var(--ak-ink); text-wrap: balance; }
body.ak main .ak-doc .ak-ls h2 .ak-n { color: var(--ak-acc); font-variant-numeric: tabular-nums; }
body.ak main .ak-doc .ak-ls h3 { margin: 2.2em 0 .6em; max-width: 52ch; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.35; letter-spacing: -.015em; font-weight: 600; color: var(--ak-ink); text-wrap: balance; }
.ak-ls p, .ak-ls ul { max-width: 56ch; margin: 0 0 1.15em; font-size: clamp(16px, 1.1vw + 3px, 17px); line-height: 1.75; color: rgba(242, 244, 245, .76); }
.ak-ls strong { font-weight: 600; color: var(--ak-ink); }
.ak-ls em { font-style: italic; }
.ak-ls ul { padding: 0; list-style: none; }
.ak-ls li { position: relative; padding-left: 1.6em; margin-bottom: .7em; }
.ak-ls li::before { content: ''; position: absolute; left: 0; top: .82em; width: 10px; height: 2px; border-radius: 1px; background: var(--ak-acc); }
.ak-ls a:not(.ak-btn) { color: var(--ak-acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(24, 191, 239, .5); overflow-wrap: anywhere; transition: color .3s, text-decoration-color .3s; }
.ak-ls a:not(.ak-btn):hover { color: var(--ak-acc-hi); text-decoration-color: currentColor; }
.ak-ls code { padding: .14em .5em; border-radius: 6px; background: rgba(24, 191, 239, .1); color: var(--ak-acc-hi); font-family: var(--ak-sans); font-size: .88em; font-weight: 500; letter-spacing: .01em; overflow-wrap: anywhere; }

/* Bouton d'action dans le texte (cookies) */
.ak-act { max-width: none; margin: 1.6em 0 1.8em; }
.ak-btn-w { white-space: normal; text-align: center; min-height: 48px; height: auto; padding-top: 12px; padding-bottom: 12px; }

/* Tableaux des cookies : une surface, des filets fins, titres de colonnes lisibles */
.ak-ls .table-wrapper { max-width: none; margin: 1.6em 0 2.2em; overflow-x: auto; border: 1px solid var(--ak-line); border-radius: 16px; background: var(--ak-bg2); }
.ak-ls table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.ak-ls th { padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--ak-ink); background: rgba(242, 244, 245, .04); border-bottom: 1px solid var(--ak-line2); }
.ak-ls td { padding: 16px 18px; vertical-align: top; color: rgba(242, 244, 245, .76); border-bottom: 1px solid var(--ak-line); }
.ak-ls tr:last-child td { border-bottom: 0; }
.ak-ls td code { white-space: nowrap; }

/* Mise à jour et petit clin d'œil de fin de page */
.ak-upd { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: none; margin: clamp(40px, 5vw, 64px) 0 0; padding-top: 22px; border-top: 1px solid var(--ak-line); font-size: 13px; line-height: 1.5; color: var(--ak-dim); }
.ak-egg { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--ak-ink); opacity: .04; transition: opacity .5s; cursor: crosshair; }
.ak-egg:hover, .ak-egg:focus-visible { opacity: 1; }
.ak-egg svg { width: 20px; height: 20px; }

/* ───────── Adaptatif ───────── */
@media (max-width: 1100px) {
	.ak-doc-g { grid-template-columns: minmax(0, 860px); gap: 40px; }
	.ak-toc { position: static; max-width: 860px; padding: 22px clamp(18px, 3vw, 28px) 12px; border: 1px solid var(--ak-line); border-radius: 18px; background: var(--ak-bg2); }
	.ak-toc ol { border-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
	.ak-toc a { padding-left: 0; border-top: 1px solid var(--ak-line); }
	.ak-toc a::before { display: none; }
	.ak-toc li:first-child a, .ak-toc li:nth-child(2) a { border-top: 0; }
}
@media (max-width: 760px) {
	.ak-toc ol { grid-template-columns: minmax(0, 1fr); }
	.ak-toc li:nth-child(2) a { border-top: 1px solid var(--ak-line); }
	.ak-ls h2 { column-gap: .45em; }
	/* Tableaux : chaque ligne devient une fiche, avec le nom de la colonne devant chaque valeur. */
	.ak-ls .cookie-table thead { display: none; } /* les noms de colonnes passent devant chaque valeur (data-label) */
	.ak-ls .cookie-table, .ak-ls .cookie-table tbody, .ak-ls .cookie-table tr, .ak-ls .cookie-table td { display: block; width: 100%; }
	.ak-ls .cookie-table tr { padding: 14px 18px; border-bottom: 1px solid var(--ak-line); }
	.ak-ls .cookie-table tr:last-child { border-bottom: 0; }
	.ak-ls .cookie-table td { padding: 5px 0; border: 0; }
	.ak-ls .cookie-table td::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ak-dim); }
	.ak-ls .cookie-table td:first-child::before { display: none; }
}
@media (max-width: 640px) {
	.ak-vf-pg { inset: 84px 12px 16px; }
	/* Téléphone : le code se pose au-dessus du texte, qu'il recouvre à peine, au lieu de se glisser dessous. */
	.ak-err { flex-direction: column; padding: 112px 0 88px; }
	.ak-err-code { position: relative; inset: auto; width: 100%; font-size: clamp(120px, 46vw, 240px); margin-bottom: -.1em; }
	.ak-err-code.ak-tcode { font-size: clamp(48px, 19.5vw, 110px); margin-bottom: .2em; }
	.ak-lh .ak-vf-pg { inset: 14px 12px; }
	.ak-btn-w { width: 100%; }
}

/* Réduire les animations : tout s'arrête, tout reste lisible. */
@media (prefers-reduced-motion: reduce) {
	.ak-err-code, .ak-err-t .ak-ln-in, .ak-vf-pg { animation: none !important; }
}
