/* WSC Ferme — feuille de la coquille /ferme, sans compilation. Système visuel des maquettes validées
   (docs/maquettes/maquettes.css, décisions C3 et C6) : thème blanc et orange, Figtree servie en local, fond #FAF8F5,
   cartes blanches bord #ECE6DE rayon 16 px, encre #1F1A15, texte secondaire #655B50, orange d'action #C2410C
   (boutons pleins, logo), orange vif #F97316 (barres, courbes), orange clair #FFF3E8 ; succès, erreur et information
   réservés à leur sens. Une seule couleur d'accent. Cibles tactiles d'au moins 44 px au téléphone.
   Poste (≥ 900 px) : en-tête blanc avec les espaces dans un rail en haut. Téléphone (360 à 412 px) : en-tête « Bonjour »
   et barre des espaces en bas, jamais de défilement horizontal. Les styles d'un domaine vont dans public/css/<domaine>.css. */

@font-face { font-family: "Figtree"; src: url("../fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
	--blanc: #FFFFFF; --fond: #FAF8F5; --trait: #ECE6DE; --trait-fort: #D9D0C5;
	--encre: #1F1A15; --gris: #655B50; --gris-clair: #F3EFEA;
	--orange: #F97316; --orange-fonce: #C2410C; --orange-nuit: #9A3412; --orange-clair: #FFF3E8; --orange-trait: #FED7AA;
	--ok: #15803D; --ok-clair: #E9F6EE; --ko: #B42318; --ko-clair: #FDEDEB; --info: #1B3A6B; --info-clair: #EBF0F8;
	--rayon: 16px; --rayon-moyen: 12px; --ombre: 0 1px 2px rgba(31, 26, 21, .05), 0 6px 20px rgba(31, 26, 21, .05);
	--barre-h: 68px;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; background: var(--fond); color: var(--encre);
	font: 400 15px/1.45 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--orange-nuit); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
.num, .tete-page, .barre, .rail { font-variant-numeric: tabular-nums; }
.gris { color: var(--gris); }
.petit { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.petit { width: 16px; height: 16px; }
.ic.grand { width: 26px; height: 26px; }

.evitement { position: absolute; left: -9999px; top: 8px; z-index: 90; background: var(--orange-fonce); color: #fff;
	padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.evitement:focus { left: 8px; }

/* ---------------------------------------------------------------- en-tête */
.entete { position: sticky; top: 0; z-index: 30; background: var(--blanc); border-bottom: 1px solid var(--trait);
	padding-top: env(safe-area-inset-top); }
.tete-poste { display: flex; align-items: center; gap: 24px; padding: 10px 32px; min-height: 62px; }
.tete-tel { display: none; }
.tete-connexion { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 32px; min-height: 62px; }
.marque { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--encre); flex: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--orange-fonce); color: #fff; display: grid; place-items: center; flex: none; }
.logo .ic { width: 21px; height: 21px; }
.logo.grand { width: 56px; height: 56px; border-radius: 16px; }
.logo.grand .ic { width: 30px; height: 30px; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marque-texte strong { font-size: 16px; font-weight: 800; }
.marque-texte small { font-size: 13px; color: var(--gris); white-space: nowrap; }

.rail { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; white-space: nowrap; }
.rail a, .rail .plus {
	display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border-radius: 10px; border: 0;
	background: none; font-weight: 600; font-size: 14px; color: var(--gris); text-decoration: none; cursor: pointer; flex: none;
}
.rail a:hover, .rail .plus:hover { background: var(--gris-clair); color: var(--encre); }
.rail a[aria-current="page"] { background: var(--orange-clair); color: var(--orange-nuit); }
.rail .ic { width: 17px; height: 17px; }

.tete-droite { display: flex; align-items: center; gap: 14px; flex: none; }
.etat { font-size: 13px; color: var(--gris); white-space: nowrap; }
.etat.hors-ligne { color: var(--ko); font-weight: 700; }
.langues { display: inline-flex; border: 1px solid var(--trait-fort); border-radius: 999px; overflow: hidden; flex: none; }
.langues button { border: 0; background: var(--blanc); color: var(--gris); min-width: 44px; min-height: 34px; padding: 0 10px;
	font-size: 12px; font-weight: 700; cursor: pointer; }
.langues button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.compte { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px 4px 4px; border-radius: 999px;
	cursor: pointer; text-align: left; min-height: 44px; min-width: 0; }
.compte:hover { background: var(--gris-clair); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange-clair); color: var(--orange-nuit); flex: none;
	display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.grand { width: 52px; height: 52px; font-size: 18px; }
.qui { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.qui strong { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qui small { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bandeau-reseau { display: flex; align-items: center; gap: 8px; margin: 14px auto 0; max-width: 1200px; width: calc(100% - 64px);
	padding: 10px 14px; border-radius: var(--rayon-moyen); background: var(--info-clair); color: var(--info); font-size: 14px; font-weight: 600; }

/* ---------------------------------------------------------------- corps */
.vue { padding: 24px 32px 40px; outline: none; }
.page { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.tete-page { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.tete-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.titre { font-size: 28px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; }
.sous-titre { color: var(--gris); font-size: 15px; }
.surtitre { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--gris); }
.file-page { font-size: 13px; font-weight: 700; color: var(--info); background: var(--info-clair); padding: 6px 12px; border-radius: 999px; }

.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; }
.puce { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px;
	font-weight: 700; white-space: nowrap; align-self: flex-start; }
.puce .ic { width: 15px; height: 15px; stroke-width: 2.5; }
.puce.ok { color: var(--ok); background: var(--ok-clair); }
.puce.ko { color: var(--ko); background: var(--ko-clair); }
.puce.info { color: var(--info); background: var(--info-clair); }
.puce.neutre { color: var(--gris); background: var(--gris-clair); }
.puce.marque { color: var(--orange-nuit); background: var(--orange-clair); }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border-radius: var(--rayon-moyen); border: 1px solid var(--trait-fort); background: var(--blanc); font-weight: 700; font-size: 15px;
	color: var(--encre); text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--gris-clair); }
.bouton.plein { background: var(--orange-fonce); border-color: var(--orange-fonce); color: #fff; }
.bouton.plein:hover { background: var(--orange-nuit); border-color: var(--orange-nuit); }
.bouton.danger { background: var(--ko); border-color: var(--ko); color: #fff; }
.bouton.grand { min-height: 56px; font-size: 17px; border-radius: 14px; width: 100%; }
.bouton.petit { min-height: 38px; padding: 0 12px; font-size: 14px; }
.bouton.fantome { border-color: transparent; background: none; }
.bouton.icone-seule { width: 44px; padding: 0; }
.bouton[disabled] { opacity: .65; cursor: progress; }

.picto { width: 40px; height: 40px; border-radius: 12px; background: var(--orange-clair); color: var(--orange-nuit); display: grid;
	place-items: center; flex: none; }
.picto.grand { width: 56px; height: 56px; border-radius: 16px; }
.picto.grand .ic { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- « Bientôt disponible » et espaces */
.bientot { display: flex; gap: 18px; align-items: flex-start; padding: 24px; }
.bientot-texte { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bientot-texte h2 { font-size: 20px; font-weight: 800; }
.bientot-texte p { max-width: 70ch; }
.bientot .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.autres { display: flex; flex-direction: column; gap: 10px; }
.grille-espaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.espace { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; text-decoration: none; color: var(--encre);
	transition: border-color .15s; }
.espace:hover { border-color: var(--orange-trait); }
.espace-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.espace strong { font-size: 15px; font-weight: 800; }
.espace small { font-size: 13px; color: var(--gris); line-height: 1.4; }

/* ---------------------------------------------------------------- barre du téléphone */
.barre { display: none; }

/* ---------------------------------------------------------------- connexion */
.page-connexion { min-height: calc(100vh - 140px); display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 16px; padding: 24px 0 40px; }
.carte-connexion { width: 100%; max-width: 420px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.connexion-tete { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.formulaire { display: flex; flex-direction: column; gap: 14px; }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.champ input, .saisie { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--trait-fort); border-radius: 12px;
	background: var(--blanc); font-size: 16px; font-weight: 500; color: var(--encre); }
textarea.saisie { padding: 10px 14px; min-height: 84px; resize: vertical; line-height: 1.45; }
.champ input:focus, .saisie:focus { outline: none; border-color: var(--orange-fonce); box-shadow: 0 0 0 3px var(--orange-clair); }
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 52px; }
.champ-mdp button { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 44px; border: 0; background: none; color: var(--gris);
	cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.message-erreur { display: flex; gap: 8px; align-items: flex-start; color: var(--ko); background: var(--ko-clair); border-radius: 12px;
	padding: 10px 12px; font-size: 14px; font-weight: 600; }
.lien-discret { font-size: 14px; font-weight: 600; align-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.mention { font-size: 13px; color: var(--gris); text-align: center; max-width: 420px; }

/* ---------------------------------------------------------------- toasts, modales */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px;
	max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; background: var(--encre); color: #fff; padding: 12px 12px 12px 14px;
	border-radius: var(--rayon-moyen); box-shadow: var(--ombre); font-size: 14px; }
.toast.ko { background: var(--ko); }
.toast.ok { background: var(--ok); }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: inherit; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; }

body.modale-ouverte { overflow: hidden; }
.voile { position: fixed; inset: 0; z-index: 70; background: rgba(31, 26, 21, .4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modale { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--blanc); border-radius: var(--rayon);
	box-shadow: 0 20px 60px rgba(31, 26, 21, .25); }
.modale-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 6px 20px; }
.modale-tete h2 { font-size: 18px; font-weight: 800; }
.modale-corps { padding: 6px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.pied-modale { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.compte-qui { display: flex; align-items: center; gap: 12px; }
.compte-qui .qui strong { font-size: 16px; white-space: normal; }
.compte-qui .qui small { font-size: 14px; white-space: normal; }
.menu-espaces { display: flex; flex-direction: column; gap: 4px; }
.menu-espaces a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 12px; color: var(--encre);
	text-decoration: none; }
.menu-espaces a:hover { background: var(--gris-clair); }
.menu-espaces .libelle { display: flex; flex-direction: column; min-width: 0; }
.menu-espaces small { color: var(--gris); font-size: 13px; }
.menu-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--trait);
	padding-top: 14px; font-size: 14px; font-weight: 700; }
.menu-ligne > span:not(.langues) { display: flex; flex-direction: column; min-width: 0; }
.menu-ligne small { font-weight: 500; color: var(--gris); }
.menu-actions { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--trait); padding-top: 14px; }
.menu-actions .bouton { justify-content: flex-start; }
.refusees { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.refusees li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: var(--ko-clair); border-radius: 12px; padding: 10px 12px; }
.refusees li > span { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.refusees small { color: var(--encre); }
.etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

.squelette { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--gris-clair), var(--fond), var(--gris-clair));
	background-size: 200% 100%; animation: miroiter 1.2s infinite linear; }
@keyframes miroiter { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- téléphone */
@media (max-width: 899px) {
	.tete-poste { display: none; }
	.tete-tel { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 8px 10px; min-height: 64px; }
	.tete-tel .compte { flex: 1; }
	.tete-tel .qui strong { font-size: 16px; font-weight: 800; }
	.tete-tel .qui small { font-size: 14px; }
	.langues button { min-height: 44px; }
	.tete-connexion { padding: 8px 12px 8px 10px; }
	.marque-texte small { white-space: normal; }
	.bandeau-reseau { width: calc(100% - 32px); margin-top: 12px; }
	.vue { padding: 14px 16px calc(var(--barre-h) + 24px + env(safe-area-inset-bottom)); }
	body.sans-session .vue { padding-bottom: 32px; }
	.titre { font-size: 22px; }
	.carte { padding: 16px; }
	.bientot { flex-direction: column; gap: 12px; padding: 18px; }
	.grille-espaces { grid-template-columns: 1fr; }
	.barre { display: grid; grid-template-columns: repeat(var(--colonnes, 5), minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
		background: var(--blanc); border-top: 1px solid var(--trait); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); gap: 2px; }
	.barre a, .barre button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px;
		padding: 4px 2px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--gris); text-decoration: none;
		border-radius: 12px; cursor: pointer; min-width: 0; }
	.barre .libelle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.barre a[aria-current="page"] { color: var(--orange-fonce); background: var(--orange-clair); }
	.toasts { left: 16px; right: 16px; bottom: calc(var(--barre-h) + 16px + env(safe-area-inset-bottom)); max-width: none; }
	.voile { align-items: flex-end; padding: 0; }
	.modale { max-width: none; border-radius: 20px 20px 0 0; max-height: 88vh; padding-bottom: env(safe-area-inset-bottom); }
	.page-connexion { min-height: auto; padding-top: 8px; }
	.carte-connexion { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}
