/*
 * GE-SitePilot : espace client (/espace-client/). Feuille autonome : aucune dépendance au thème ni à l'administration.
 * Cibles tactiles de 44 px minimum (page publique), contrastes AA, focus visible, mise en page fluide sans défilement horizontal.
 * Police Montserrat hébergée avec le plugin (licence OFL), repli sur les polices du système.
 */
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/montserrat-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--p-brand: #6e5936;
	--p-brand-dark: #55442a;
	--p-brand-light: #f5f0e8;
	--p-text: #1a1a1a;
	--p-muted: #4d4d4d;
	--p-border: #d6d0c4;
	--p-bg: #faf8f4;
	--p-white: #ffffff;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body.ge-portal {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--p-bg);
	color: var(--p-text);
	font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

.ge-portal-skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	padding: 0.75rem 1rem;
	background: var(--p-brand-dark);
	color: var(--p-white);
	z-index: 10;
}

.ge-portal-skip:focus {
	top: 1rem;
}

.ge-portal-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	padding: 0.75rem 1rem;
	background: var(--p-white);
	border-bottom: 3px solid var(--p-brand);
}

.ge-portal-brand {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--p-brand-dark);
}

.ge-portal-user {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.ge-portal-who {
	margin: 0;
	color: var(--p-muted);
	overflow-wrap: anywhere;
}

.ge-portal-main {
	flex: 1 0 auto;
	width: 100%;
	max-width: 54rem;
	margin: 0 auto;
	padding: 1.5rem 1rem 2rem;
}

.ge-portal-main:focus {
	outline: none;
}

.ge-portal-eyebrow {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--p-brand);
}

h1 {
	margin: 0.25rem 0 1.25rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.25;
	color: var(--p-text);
	overflow-wrap: anywhere;
}

h2 {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--p-brand-dark);
}

.ge-portal-family {
	margin: 1.25rem 0 0.5rem;
	font-size: 1rem;
	color: var(--p-text);
}

.ge-portal-section {
	margin: 0 0 1.5rem;
	padding: 1.25rem 1rem;
	background: var(--p-white);
	border: 1px solid var(--p-border);
	border-radius: 8px;
}

.ge-portal-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ge-portal-list li {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.625rem 0;
	border-top: 1px solid var(--p-brand-light);
}

.ge-portal-list li:first-child {
	border-top: 0;
}

.ge-portal-list span {
	color: var(--p-muted);
}

.ge-portal-empty {
	margin: 0;
	color: var(--p-muted);
}

.ge-portal-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.5rem 0.75rem;
	margin: 0 0 1.5rem;
}

.ge-portal-switch label {
	flex: 1 0 100%;
	font-weight: 600;
}

.ge-portal-switch select {
	flex: 1 1 14rem;
	min-width: 0;
	max-width: 100%;
}

select {
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--p-text);
	background: var(--p-white);
	border: 2px solid var(--p-muted);
	border-radius: 6px;
}

.ge-portal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	min-width: 2.75rem;
	padding: 0.5rem 1rem;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	color: var(--p-brand-dark);
	background: var(--p-white);
	border: 2px solid var(--p-brand);
	border-radius: 6px;
	cursor: pointer;
}

.ge-portal-btn:hover {
	background: var(--p-brand-light);
}

.ge-portal-btn-primary {
	color: var(--p-white);
	background: var(--p-brand-dark);
	border-color: var(--p-brand-dark);
}

.ge-portal-btn-primary:hover {
	background: var(--p-brand);
	border-color: var(--p-brand);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
.ge-portal-main:focus-visible {
	outline: 3px solid var(--p-text);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--p-white);
}

.ge-portal-footer {
	padding: 1rem;
	text-align: center;
	color: var(--p-muted);
	font-size: 0.875rem;
}

.ge-portal-footer p {
	margin: 0;
}

@media (min-width: 40rem) {
	.ge-portal-header {
		padding: 0.75rem 2rem;
	}

	.ge-portal-section {
		padding: 1.5rem;
	}

	.ge-portal-list li {
		flex-direction: row;
		gap: 1rem;
		align-items: baseline;
	}

	.ge-portal-list li strong {
		flex: 0 0 14rem;
	}
}

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

/* Mes chiffres (étape 5) */
.ge-portal-unit {
	font-weight: 400;
	color: var(--p-muted);
}

.ge-portal-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ge-portal-tablewrap {
	overflow-x: auto;
}

.ge-portal-table {
	width: 100%;
	border-collapse: collapse;
}

.ge-portal-table th,
.ge-portal-table td {
	padding: 0.625rem 0.5rem;
	text-align: left;
	border-top: 1px solid var(--p-brand-light);
	overflow-wrap: anywhere;
}

.ge-portal-table thead th {
	border-top: 0;
	color: var(--p-muted);
	font-weight: 600;
}

.ge-portal-states {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.ge-portal-states li {
	margin: 0.25rem 0;
}

.ge-portal-flash {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	border: 2px solid var(--p-brand);
	background: var(--p-brand-light);
}

.ge-portal-flash-alert {
	border-color: #8a1f11;
	background: #fdf0ee;
	color: #5c130a;
}

.ge-portal-flash:focus {
	outline: 3px solid var(--p-text);
	outline-offset: 2px;
}

.ge-portal-form p {
	margin: 0 0 1rem;
}

.ge-portal-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.ge-portal-form select,
.ge-portal-form input[type="text"] {
	width: 100%;
	max-width: 24rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--p-text);
	background: var(--p-white);
	border: 2px solid var(--p-muted);
	border-radius: 6px;
}

.ge-portal-help {
	display: block;
	margin-top: 0.25rem;
	color: var(--p-muted);
	font-size: 0.875rem;
}

input:focus-visible {
	outline: 3px solid var(--p-text);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--p-white);
}
