/* ============================================================
   TRANSFERT — SOCLE
   ------------------------------------------------------------
   Réinitialisation, typographie, composants partagés par toutes
   les pages. Mobile-first : les règles de base valent pour les
   petits écrans, les media queries n'ajoutent que de l'aisance.
   ============================================================ */

/* ------------------------------------------------------------
   1. RÉINITIALISATION
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

/* L'attribut `hidden` doit toujours l'emporter.
   Le navigateur lui applique `display: none`, mais toute classe qui
   définit un `display` gagne en spécificité — un bouton masqué par
   `hidden` restait donc affiché à cause de `.btn { display: flex }`.
   C'est le genre de détail qui ne se voit qu'à l'écran. */
[hidden] { display: none !important; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--entete-h) + var(--enc-haut) + var(--e4));
}

body {
	min-height: 100svh;
	font-family: var(--font-texte);
	font-size: var(--t-base);
	line-height: var(--lh-texte);
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
	padding-left: var(--enc-gauche);
	padding-right: var(--enc-droite);
}

img, svg, video, canvas { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: none; padding: 0; cursor: pointer; }

ul, ol { padding: 0; list-style: none; }

/* ------------------------------------------------------------
   2. TYPOGRAPHIE
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
	font-family: var(--font-titre);
	font-weight: 700;
	line-height: var(--lh-titre);
	letter-spacing: -0.015em;
	color: var(--text);
	text-wrap: balance;
}

h1 { font-size: var(--t-3xl); letter-spacing: -0.025em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); font-weight: 600; }
h4 { font-size: var(--t-md); font-weight: 600; }

p { text-wrap: pretty; }

a {
	color: var(--accent-fort);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--t-rapide) var(--ease);
}
a:hover { color: var(--text); }

strong, b { font-weight: 600; }

.chapo {
	font-size: var(--t-lg);
	color: var(--text-secondary);
	line-height: 1.55;
	max-width: 62ch;
}

.sourdine  { color: var(--text-secondary); }
.minuscule { font-size: var(--t-xs); line-height: 1.5; }
.num       { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.mono      { font-family: var(--font-mono); font-size: 0.9em; }

.surtitre {
	display: inline-block;
	font-family: var(--font-titre);
	font-size: var(--t-xs);
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.tronque {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* ------------------------------------------------------------
   3. ACCESSIBILITÉ
   ------------------------------------------------------------ */
.hors-ecran {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Un seul style de focus dans toute l'application, toujours
   visible sur les deux thèmes. */
:focus-visible {
	outline: 2px solid var(--accent-fort);
	outline-offset: 2px;
	border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

.lien-evitement {
	position: absolute;
	top: -100px;
	left: var(--e4);
	z-index: var(--z-skip);
	padding: var(--e3) var(--e4);
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	box-shadow: var(--ombre-2);
	transition: top var(--t-rapide) var(--ease);
}
.lien-evitement:focus { top: calc(var(--e3) + var(--enc-haut)); }

/* ------------------------------------------------------------
   4. GABARIT
   ------------------------------------------------------------ */
.enveloppe {
	width: 100%;
	max-width: var(--largeur);
	margin-inline: auto;
	padding-inline: var(--e4);
}
.enveloppe--large { max-width: var(--largeur-large); }

.page {
	display: flex;
	flex-direction: column;
	min-height: 100svh;
}
.page > main { flex: 1; padding-block: var(--e6) var(--e7); }

.pile { display: flex; flex-direction: column; gap: var(--e4); }
.pile--serree { gap: var(--e2); }
.pile--large  { gap: var(--e6); }

.rangee {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--e3);
}
.rangee--espacee { justify-content: space-between; }
.pousse { margin-left: auto; }

/* ------------------------------------------------------------
   5. EN-TÊTE
   ------------------------------------------------------------ */
.entete {
	position: sticky;
	top: 0;
	z-index: var(--z-entete);
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	border-bottom: 1px solid var(--border);
	padding-top: var(--enc-haut);
}

@supports (backdrop-filter: blur(1px)) {
	.entete { backdrop-filter: saturate(180%) blur(12px); }
}
@supports not (backdrop-filter: blur(1px)) {
	.entete { background: var(--bg); }
}

.entete__barre {
	position: relative; /* ancre le panneau de navigation mobile */
	display: flex;
	align-items: center;
	gap: var(--e3);
	min-height: var(--entete-h);
}

/* La marque est un lien : sa hauteur de cible doit être celle de
   n'importe quel autre lien de l'en-tête, même si le dessin fait
   28 px de haut. */
.marque {
	display: inline-flex;
	align-items: center;
	gap: var(--e2);
	min-height: var(--cible-tactile);
	color: var(--text);
	text-decoration: none;
	font-family: var(--font-titre);
	white-space: nowrap;
}
.marque__glyphe { color: var(--accent-fort); flex: none; }
.marque__texte { display: flex; gap: 0.3em; font-size: var(--t-md); }
.marque__prenom { font-weight: 600; color: var(--text-secondary); }
.marque__nom    { font-weight: 700; letter-spacing: 0.02em; }

.entete__service {
	font-family: var(--font-texte);
	font-size: var(--t-xs);
	font-weight: 500;
	color: var(--text-muted);
	padding-left: var(--e3);
	margin-left: var(--e1);
	border-left: 1px solid var(--border);
}

.entete__outils {
	display: flex;
	align-items: center;
	gap: var(--e2);
	margin-left: auto;
	flex: none;
}

.bascule-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cible-tactile);
	height: var(--cible-tactile);
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	transition: background var(--t-rapide) var(--ease);
}
.bascule-nav:hover { background: var(--surface-subtle); color: var(--text); }

/* Navigation mobile : panneau déroulant ancré sous la barre.
   Il ne pousse plus le contenu et n'ajoute pas une deuxième
   ligne permanente à l'en-tête. */
.nav { display: none; }

.nav.est-ouvert {
	position: absolute;
	top: calc(100% - var(--e2));
	right: 0;
	z-index: var(--z-entete);
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 220px;
	padding: var(--e2);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--ombre-3);
	animation: glisse-bas var(--t-rapide) var(--ease-out);
}

.nav a {
	display: flex;
	align-items: center;
	gap: var(--e3);
	min-height: var(--cible-tactile);
	padding: var(--e2) var(--e3);
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	text-decoration: none;
	font-weight: 500;
	transition: background var(--t-rapide) var(--ease), color var(--t-rapide) var(--ease);
}
.nav a:hover { background: var(--surface-subtle); color: var(--text); }
.nav a[aria-current='page'] {
	background: var(--accent-doux);
	color: var(--accent-fort);
	font-weight: 600;
}

/* ------------------------------------------------------------
   6. SÉLECTEUR DE THÈME
   ------------------------------------------------------------ */
.theme {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	padding: 2px;
	background: var(--surface-subtle);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
}

.theme__choix {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-pill);
	color: var(--text-muted);
	transition: background var(--t-rapide) var(--ease), color var(--t-rapide) var(--ease);
}
.theme__choix:hover { color: var(--text); }
.theme__choix[aria-checked='true'] {
	background: var(--surface);
	color: var(--accent-fort);
	box-shadow: var(--ombre-1);
}

/* Deux boutons de 36 px tiennent partout, y compris à 320 px à
   côté de la marque et du bouton de menu : plus besoin du mode
   compact qui n'en affichait qu'un seul. */

/* ------------------------------------------------------------
   7. BOUTONS
   ------------------------------------------------------------ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--e2);
	min-height: var(--cible-tactile);
	padding: var(--e2) var(--e5);
	font-family: var(--font-texte);
	font-size: var(--t-base);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background var(--t-rapide) var(--ease),
	            border-color var(--t-rapide) var(--ease),
	            color var(--t-rapide) var(--ease),
	            transform var(--t-rapide) var(--ease);
}
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.btn--primaire {
	background: var(--primary);
	color: var(--primary-contre);
}
.btn--primaire:hover:not([disabled]) { background: var(--primary-dark); color: var(--primary-contre); }

.btn--fantome {
	background: var(--surface);
	color: var(--text);
	border-color: var(--border-strong);
}
.btn--fantome:hover:not([disabled]) { background: var(--surface-subtle); color: var(--text); }

.btn--discret {
	background: transparent;
	color: var(--text-secondary);
}
.btn--discret:hover:not([disabled]) { background: var(--surface-subtle); color: var(--text); }

.btn--danger {
	background: var(--terracotta);
	color: #FFFFFF;
}
.btn--danger:hover:not([disabled]) { background: #A66850; color: #FFFFFF; }

.btn--lg { min-height: 52px; padding-inline: var(--e6); font-size: var(--t-md); }
.btn--sm { min-height: 38px; padding-inline: var(--e3); font-size: var(--t-sm); gap: var(--e1); }
.btn--pleine { width: 100%; }

/* Bouton d'icône seule. La cible tactile fait toujours 44 px,
   même quand le dessin est plus petit. */
.btn-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cible-tactile);
	height: var(--cible-tactile);
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	transition: background var(--t-rapide) var(--ease), color var(--t-rapide) var(--ease);
}
.btn-ico:hover:not([disabled]) { background: var(--surface-subtle); color: var(--text); }
.btn-ico--danger:hover:not([disabled]) { background: var(--danger-fond); color: var(--danger); }
.btn-ico[disabled] { opacity: 0.4; cursor: not-allowed; }

.ico { flex: none; }

/* ------------------------------------------------------------
   8. CARTES
   ------------------------------------------------------------ */
.carte {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--ombre-1);
	overflow: hidden;
}

.carte__tete {
	display: flex;
	align-items: center;
	gap: var(--e3);
	padding: var(--e4) var(--e5);
	border-bottom: 1px solid var(--border);
	color: var(--text-muted);
}
.carte__tete h2 { font-size: var(--t-md); font-weight: 600; color: var(--text); }

.carte__corps { padding: var(--e5); }
.carte__pied {
	padding: var(--e4) var(--e5);
	border-top: 1px solid var(--border);
	background: var(--surface-subtle);
}

/* ------------------------------------------------------------
   9. FORMULAIRES
   ------------------------------------------------------------ */
/* Un fieldset porte par défaut une bordure et un padding hérités
   des formulaires de 1997. On les enlève : le regroupement reste
   sémantique, il n'a pas à se voir. */
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { padding: 0; }

.champ { display: flex; flex-direction: column; gap: var(--e2); }

.champ > label,
.champ__legende {
	font-size: var(--t-sm);
	font-weight: 600;
	color: var(--text);
}

.saisie {
	width: 100%;
	min-height: var(--cible-tactile);
	padding: var(--e2) var(--e3);
	font-size: var(--t-md); /* 16 px minimum : en dessous, iOS zoome au focus */
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	transition: border-color var(--t-rapide) var(--ease), box-shadow var(--t-rapide) var(--ease);
}
.saisie::placeholder { color: var(--text-muted); }
.saisie:focus {
	outline: none;
	border-color: var(--accent-fort);
	box-shadow: var(--halo);
}
.saisie[readonly] { background: var(--surface-subtle); color: var(--text-secondary); }
.saisie[aria-invalid='true'] { border-color: var(--danger); }

.aide { font-size: var(--t-sm); color: var(--text-secondary); }
.aide.est-ok { color: var(--ok); }
.aide.est-ko { color: var(--danger); }

/* Champ mot de passe avec bouton de révélation */
.motdepasse { position: relative; display: flex; }
.motdepasse .saisie { padding-right: calc(var(--cible-tactile) + var(--e1)); }
.motdepasse__oeil {
	position: absolute;
	right: 2px; top: 50%;
	transform: translateY(-50%);
	width: var(--cible-tactile);
	height: var(--cible-tactile);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
}
.motdepasse__oeil:hover { color: var(--text); }

/* Puces radio */
.puces { display: flex; flex-wrap: wrap; gap: var(--e2); }

.puce { position: relative; display: inline-flex; }
.puce input {
	position: absolute;
	opacity: 0;
	width: 100%; height: 100%;
	margin: 0;
	cursor: pointer;
}
.puce span {
	display: inline-flex;
	align-items: center;
	gap: var(--e1);
	min-height: 40px;
	padding: var(--e2) var(--e4);
	font-size: var(--t-sm);
	font-weight: 500;
	color: var(--text-secondary);
	background: var(--surface-subtle);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	transition: all var(--t-rapide) var(--ease);
}
.puce input:checked + span {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--primary-contre);
	font-weight: 600;
}
.puce input:focus-visible + span { outline: 2px solid var(--accent-fort); outline-offset: 2px; }
.puce input:hover:not(:checked) + span { border-color: var(--border-strong); color: var(--text); }

/* Interrupteur */
.bascule {
	display: flex;
	align-items: flex-start;
	gap: var(--e3);
	cursor: pointer;
	padding: var(--e1) 0;
}
.bascule input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.bascule__rail {
	position: relative;
	flex: none;
	width: 44px; height: 26px;
	margin-top: 2px;
	background: var(--border-strong);
	border-radius: var(--radius-pill);
	transition: background var(--t-moyen) var(--ease);
}
.bascule__rail::after {
	content: '';
	position: absolute;
	top: 3px; left: 3px;
	width: 20px; height: 20px;
	background: #FFFFFF;
	border-radius: 50%;
	box-shadow: var(--ombre-1);
	transition: transform var(--t-moyen) var(--ease);
}
.bascule input:checked + .bascule__rail { background: var(--accent-fort); }
.bascule input:checked + .bascule__rail::after { transform: translateX(18px); }
.bascule input:focus-visible + .bascule__rail { outline: 2px solid var(--accent-fort); outline-offset: 2px; }

.bascule__texte { display: flex; flex-direction: column; gap: 2px; }
.bascule__texte b { font-size: var(--t-base); font-weight: 600; }
.bascule__texte span { font-size: var(--t-sm); color: var(--text-secondary); line-height: 1.45; }

/* Repli progressif : le contenu n'apparaît que si l'option est
   cochée, ce qui évite d'afficher un formulaire inutile. */
.repli { display: none; }
.repli.est-ouvert {
	display: block;
	padding: var(--e4);
	background: var(--surface-subtle);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	animation: glisse-bas var(--t-moyen) var(--ease-out);
}

/* ------------------------------------------------------------
   10. ÉTIQUETTES ET NOTES
   ------------------------------------------------------------ */
.etiquette {
	display: inline-flex;
	align-items: center;
	gap: var(--e1);
	padding: 3px var(--e3);
	font-size: var(--t-xs);
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	color: var(--text-secondary);
	background: var(--surface-subtle);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
}
.etiquette--ok        { color: var(--ok); background: var(--ok-fond); border-color: transparent; }
.etiquette--attention { color: var(--attention); background: var(--att-fond); border-color: transparent; }
.etiquette--danger    { color: var(--danger); background: var(--danger-fond); border-color: transparent; }

.note {
	display: flex;
	align-items: flex-start;
	gap: var(--e3);
	padding: var(--e3) var(--e4);
	font-size: var(--t-sm);
	line-height: 1.55;
	border-radius: var(--radius-sm);
	background: var(--surface-subtle);
	color: var(--text-secondary);
	border-left: 3px solid var(--border-strong);
}
.note .ico { margin-top: 2px; }
.note--info      { background: var(--accent-doux); color: var(--text); border-left-color: var(--accent-fort); }
.note--ok        { background: var(--ok-fond); color: var(--ok); border-left-color: var(--ok); }
.note--attention { background: var(--att-fond); color: var(--attention); border-left-color: var(--attention); }
.note--danger    { background: var(--danger-fond); color: var(--danger); border-left-color: var(--terracotta); }

/* ------------------------------------------------------------
   11. LISTE DE DÉFINITIONS
   ------------------------------------------------------------ */
.definitions { display: flex; flex-direction: column; gap: 0; }
.definitions > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--e3);
	padding: var(--e3) 0;
	border-bottom: 1px solid var(--border);
}
.definitions > div:last-child { border-bottom: none; }
.definitions dt { font-size: var(--t-sm); color: var(--text-secondary); }
.definitions dd { font-size: var(--t-base); font-weight: 500; text-align: right; min-width: 0; }

/* ------------------------------------------------------------
   12. ÉTAT VIDE
   ------------------------------------------------------------ */
.vide {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--e4);
	padding: var(--e7) var(--e4);
	text-align: center;
	color: var(--text-muted);
}
.vide p { max-width: 40ch; }

.glyphe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px; height: 64px;
	border-radius: 50%;
	background: var(--accent-doux);
	color: var(--accent-fort);
	flex: none;
}
.glyphe--attention { background: var(--att-fond); color: var(--attention); }
.glyphe--danger    { background: var(--danger-fond); color: var(--danger); }
.glyphe--neutre    { background: var(--surface-subtle); color: var(--text-muted); }

/* ------------------------------------------------------------
   13. NOTIFICATIONS
   ------------------------------------------------------------ */
.notifs {
	position: fixed;
	left: var(--e4);
	right: var(--e4);
	bottom: calc(var(--e4) + var(--enc-bas));
	z-index: var(--z-toast);
	display: flex;
	flex-direction: column;
	gap: var(--e2);
	pointer-events: none;
}

.notif {
	display: flex;
	align-items: flex-start;
	gap: var(--e3);
	padding: var(--e3) var(--e4);
	font-size: var(--t-sm);
	line-height: 1.5;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	box-shadow: var(--ombre-3);
	pointer-events: auto;
	animation: glisse-haut var(--t-moyen) var(--ease-out);
}
.notif .ico { margin-top: 2px; flex: none; }
.notif--ok     { border-left: 3px solid var(--ok); }
.notif--ok .ico { color: var(--ok); }
.notif--danger { border-left: 3px solid var(--terracotta); }
.notif--danger .ico { color: var(--danger); }
.notif--info .ico { color: var(--accent-fort); }
.notif.part { animation: fondu-sortie var(--t-moyen) var(--ease) forwards; }

.notif__fermer {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px; height: 28px;
	flex: none;
	border-radius: var(--radius-xs);
	color: var(--text-muted);
}
.notif__fermer:hover { background: var(--surface-subtle); color: var(--text); }

/* ------------------------------------------------------------
   14. MODALE
   ------------------------------------------------------------ */
.modale {
	position: fixed;
	inset: 0;
	z-index: var(--z-modale);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: var(--e4);
	padding-bottom: calc(var(--e4) + var(--enc-bas));
	background: rgba(29, 33, 28, 0.55);
	animation: fondu-entree var(--t-rapide) var(--ease);
}
@supports (backdrop-filter: blur(1px)) {
	.modale { backdrop-filter: blur(3px); }
}
.modale.part { animation: fondu-sortie var(--t-rapide) var(--ease) forwards; }

.modale__boite {
	width: 100%;
	max-width: 460px;
	padding: var(--e5);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--ombre-3);
	animation: glisse-haut var(--t-moyen) var(--ease-out);
}
.modale__boite h2 { font-size: var(--t-lg); margin-bottom: var(--e2); }
.modale__actions {
	display: flex;
	flex-direction: column;
	gap: var(--e2);
	margin-top: var(--e5);
}

/* ------------------------------------------------------------
   15. TABLEAU
   ------------------------------------------------------------ */
.tableau-cadre { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tableau { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tableau th {
	padding: var(--e3) var(--e4);
	text-align: left;
	font-size: var(--t-xs);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.tableau td {
	padding: var(--e3) var(--e4);
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}
.tableau tbody tr:last-child td { border-bottom: none; }
.tableau tbody tr { transition: background var(--t-rapide) var(--ease); }
.tableau tbody tr:hover { background: var(--surface-subtle); }
.tableau tbody tr.part { opacity: 0.4; }

.actions { display: flex; gap: var(--e1); justify-content: flex-end; }

/* ------------------------------------------------------------
   16. PIED DE PAGE
   ------------------------------------------------------------ */
.pied {
	padding: var(--e6) 0 calc(var(--e6) + var(--enc-bas));
	border-top: 1px solid var(--border);
	font-size: var(--t-sm);
	color: var(--text-muted);
}
.pied__grille { display: flex; flex-direction: column; gap: var(--e4); }
.pied a { color: var(--text-secondary); }
.pied a:hover { color: var(--accent-fort); }
.pied__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); font-size: var(--t-xs); }
.point { opacity: 0.4; }

/* Signature du concepteur : présente, mais jamais devant le
   service. Elle ne prend sa couleur qu'au survol. */
.pied__credit {
	color: var(--text-muted);
	text-decoration-color: transparent;
	transition: color var(--t-rapide) var(--ease),
	            text-decoration-color var(--t-rapide) var(--ease);
}
.pied__credit:hover,
.pied__credit:focus-visible {
	color: var(--accent-fort);
	text-decoration-color: currentColor;
}

/* ------------------------------------------------------------
   17. ANIMATIONS
   ------------------------------------------------------------ */
@keyframes fondu-entree { from { opacity: 0; } to { opacity: 1; } }
@keyframes fondu-sortie { to { opacity: 0; transform: translateY(6px); } }
@keyframes glisse-haut  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes glisse-bas   { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes rotation     { to { transform: rotate(360deg); } }

.tourne { animation: rotation 1s linear infinite; }

/* ------------------------------------------------------------
   18. PALIERS
   ------------------------------------------------------------ */

/* Petits téléphones : on récupère de la place */
@media (max-width: 400px) {
	.enveloppe { padding-inline: var(--e3); }
	.carte__corps, .carte__tete, .carte__pied { padding-inline: var(--e4); }
	.entete__service { display: none; }
	.marque__prenom { display: none; }
	.btn { padding-inline: var(--e4); }
}

/* Téléphones larges et petites tablettes */
@media (min-width: 480px) {
	.modale { align-items: center; }
	.modale__actions { flex-direction: row; justify-content: flex-end; }
	.modale__actions .btn { flex: 1; }
	.notifs { left: auto; right: var(--e5); max-width: 420px; }
}

/* À partir de 900 px, la navigation se déplie à droite de la barre,
   sur la même ligne que la marque. Les outils restent à l'extrémité. */
@media (min-width: 900px) {
	.bascule-nav { display: none; }

	.nav,
	.nav.est-ouvert {
		position: static;
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: var(--e1);
		min-width: 0;
		margin-left: auto;
		padding: 0;
		background: none;
		border: none;
		box-shadow: none;
		animation: none;
	}
	.nav a { min-height: 38px; padding: var(--e2) var(--e3); font-size: var(--t-sm); }

	/* La navigation prend le rôle de séparateur : les outils se
	   collent à elle plutôt que d'être repoussés au loin. */
	.nav + .entete__outils { margin-left: var(--e4); }

	.page > main { padding-block: var(--e7) var(--e8); }

	.pied__grille {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* ------------------------------------------------------------
   19. PRÉFÉRENCES SYSTÈME
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (prefers-contrast: more) {
	:root { --border: var(--text-muted); --border-strong: var(--text-secondary); }
	.btn { border-width: 2px; }
	a { text-decoration: underline; }
}

/* ------------------------------------------------------------
   20. IMPRESSION
   ------------------------------------------------------------ */
@media print {
	.entete, .pied, .notifs, .theme, .btn, .btn-ico, .lien-evitement { display: none !important; }
	body { background: #FFFFFF; color: #000000; }
	.carte { box-shadow: none; border: 1px solid #CCCCCC; break-inside: avoid; }
}
