/* ============================================================
   gestionmanif — styles des pages Thymeleaf (complément Bootstrap 5)

   CHARTE ESPACECLUB (docs/designClub/style.css) : les tokens --scc-*
   sont repris à l'identique du club, ainsi que les composants
   btn-scc-*, inputs Carbon « underline », bandeau/footer marine.
   NB : style.css (racine du WAR) reste la feuille des JSP legacy.
   ============================================================ */

/* ---------- Polices (locales, cf. css/fonts/) ---------- */

@font-face {
	font-family: "Oswald";
	src: url("fonts/oswald.woff2") format("woff2");
	font-weight: 400 500;
	font-display: swap;
}

@font-face {
	font-family: "PT Sans";
	src: url("fonts/ptsans-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "PT Sans";
	src: url("fonts/ptsans-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

/* ---------- Tokens EspaceClub (repris tels quels) ---------- */

:root {
	--scc-gold:        #8B6A3E; /* accessible — contraste 4.97:1 sur blanc (WCAG AA) */
	--scc-gold-deco:   #C6985F; /* décoratif uniquement — bordures, hover bg, séparateurs */

	--scc-marine:      #2B2E40; /* navbar, footer, en-têtes */
	--scc-bg:          #f4f4f4; /* Carbon Gray 10 — fond page */
	--scc-bg-card:     #ffffff; /* Carbon White — fond cards, inputs, modales */
	--scc-text:        #161616; /* Carbon Gray 100 — texte principal */
	--scc-text-muted:  #525252; /* Carbon Gray 70 — texte secondaire */
	--scc-border:      #e0e0e0; /* Carbon Gray 20 — bordures légères */
	--scc-border-mid:  #8d8d8d; /* Carbon Gray 50 — bordures inputs */
	--scc-border-dark: #6f6f6f; /* Carbon Gray 60 — bordures focus */
	--scc-hover-bg:    #F0E8DB; /* SCC gold tint — hover rows */
	--scc-tab-row-even:#f4f4f4; /* Carbon Gray 10 — lignes paires */

	--scc-danger:      #CB3E3B;
	--scc-danger-bg:   #f8d7da;
}

/* ---------- Base (typo club) ---------- */

body {
	background-color: var(--scc-bg);
	font-family: "Oswald", sans-serif;
	font-size: 0.875em;
	font-weight: 400;
	color: var(--scc-text);
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, .card-header, label {
	font-family: "PT Sans", sans-serif;
}

label.form-label {
	font-weight: 700;
	font-size: 0.8125rem;
	margin-bottom: 0.25rem;
}

/* ---------- Bandeau d'application (marine, façon navbar club) ---------- */

.gm-entete {
	background-color: var(--scc-marine);
	color: #fff;
}

.gm-logo {
	height: 56px;
	background: #fff;
	padding: 2px;
}

.gm-titre-appli {
	font-family: "Oswald", sans-serif;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--scc-gold-deco);
}

.gm-titre-page {
	font-family: "PT Sans", sans-serif;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Titre de l'écran, dans le contenu : sur fond clair, le marine du bandeau,
   souligné de l'or décoratif pour marquer le début de la page. */
.gm-titre-ecran {
	border-bottom: 2px solid var(--scc-gold-deco);
	padding-bottom: 0.35rem;
}

.gm-titre-ecran .gm-titre-page {
	color: var(--scc-marine);
}

/* Bulle d'aide du tour guidé.
   NB : la version du club portait line-height:0 et vertical-align:super, ce qui
   donnait une boîte de 12x0 px — le glyphe débordait (donc visible) mais la
   zone cliquable était nulle. Ici une vraie cible, confortable au clic. */
.tour-help-icon {
	font-size: 0.85rem;
	line-height: 1;
	vertical-align: middle;
	margin-left: 0.4rem;
	padding: 0.3rem;
	color: var(--scc-gold);
	opacity: 0.8;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.tour-help-icon:hover {
	opacity: 1;
}

/* Navigation du bandeau authentifié (liens blancs, hover or — comme la navbar club) */
.gm-nav a,
.gm-nav-logout {
	color: #fff;
	font-family: "Oswald", sans-serif;
	font-size: 0.75rem;
	text-transform: uppercase;
	text-decoration: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.gm-nav a:hover,
.gm-nav-logout:hover {
	color: var(--scc-gold-deco);
	border-bottom: 2px solid var(--scc-gold-deco);
}

/* ---------- Carte de critères ---------- */

.gm-card {
	background: var(--scc-bg-card);
	border: 1px solid var(--scc-border);
	border-radius: 0; /* angles droits, comme le club */
}

.gm-card .card-header {
	background: var(--scc-bg-card);
	border-bottom: 1px solid var(--scc-border);
	font-weight: 700;
	color: var(--scc-marine);
	text-transform: uppercase;
	font-size: 0.8125rem;
}

.gm-card .card-header i {
	color: var(--scc-gold);
}

/* ---------- Boutons club ---------- */

.btn-scc-primary, .btn-scc-primary:focus {
	background-color: var(--scc-marine);
	border: 2px solid transparent;
	border-radius: 0;
	box-shadow: none;
	color: #fff;
}

.btn-scc-primary:hover {
	background-color: #181B29;
	color: var(--scc-gold);
}

.btn-scc-primary:disabled {
	background-color: var(--scc-border);
	color: var(--scc-border-dark);
}

.btn-scc-secondary, .btn-scc-secondary:focus {
	background-color: var(--scc-gold);
	border: 2px solid transparent;
	border-radius: 0;
	box-shadow: none;
	color: #fff;
}

.btn-scc-secondary:hover {
	background-color: #CBA773;
	color: white;
}

.btn-scc-tertiary, .btn-scc-tertiary:focus {
	background-color: var(--scc-bg-card);
	border: 2px solid var(--scc-gold);
	border-radius: 0;
	box-shadow: none;
	color: var(--scc-gold);
	font-size: 0.8125rem;
	padding: 7px 22px;
}

.btn-scc-tertiary:hover {
	background-color: var(--scc-bg-card);
	border-color: var(--scc-marine);
	color: var(--scc-marine);
}

/* Choix exclusif rendu par des boutons (btn-check + btn-scc-tertiary) — repris
   du club : l'option cochée reste marquée en or une fois la souris partie. */
.btn-check:checked + .btn-scc-tertiary {
	background-color: var(--scc-gold);
	border-color: var(--scc-gold);
	color: #fff;
	font-weight: 600;
}

.btn-check:checked + .btn-scc-tertiary:hover {
	background-color: var(--scc-marine);
	border-color: var(--scc-marine);
	color: #fff;
}

.btn-check:focus-visible + .btn-scc-tertiary {
	outline: 2px solid var(--scc-marine);
	outline-offset: 2px;
}

:focus-visible {
	outline: 2px solid var(--scc-gold-deco);
	outline-offset: 2px;
}

/* ---------- Inputs Carbon « underline » (comme le club) ---------- */

select.form-select {
	background-color: var(--scc-bg-card);
	border: none;
	border-bottom: 1px solid var(--scc-border-mid);
	border-radius: 0;
	color: var(--scc-text);
	font-family: "PT Sans", sans-serif;
	font-size: 0.875rem;
	height: 40px;
	padding: 0 15px;
}

select.form-select:focus {
	outline: 2px solid var(--scc-gold-deco);
	outline-offset: -2px;
	border-bottom-color: var(--scc-text);
	box-shadow: none;
}

select.form-select:hover {
	border-bottom-color: var(--scc-text);
}

input.form-control {
	background-color: var(--scc-bg-card);
	border: none;
	border-bottom: 1px solid var(--scc-border-mid);
	border-radius: 0;
	font-family: "PT Sans", sans-serif;
	font-size: 0.875rem;
	height: 40px;
}

input.form-control:focus {
	outline: 2px solid var(--scc-gold-deco);
	outline-offset: -2px;
	border-bottom-color: var(--scc-text);
	box-shadow: none;
}

/* Cases à cocher et boutons radio : bordure marquée, coche or */
.form-check-input {
	border: 2px solid var(--scc-border-mid);
	background-color: var(--scc-bg-card);
}

.form-check-input:hover {
	border-color: var(--scc-text);
}

.form-check-input:focus {
	border-color: var(--scc-gold-deco);
	box-shadow: 0 0 0 0.2rem rgba(198, 152, 95, 0.35);
}

.form-check-input:checked {
	background-color: var(--scc-gold);
	border-color: var(--scc-gold);
}

.form-check-input:disabled {
	border-color: var(--scc-border);
}

/* TomSelect accordé au style Carbon */
.ts-control {
	border: none !important;
	border-bottom: 1px solid var(--scc-border-mid) !important;
	border-radius: 0 !important;
	min-height: 40px;
	font-family: "PT Sans", sans-serif;
}

.ts-wrapper.focus .ts-control {
	outline: 2px solid var(--scc-gold-deco);
	outline-offset: -2px;
	box-shadow: none !important;
}

/* ---------- Résultats ---------- */

.gm-resume-resultats {
	color: var(--scc-text-muted);
	font-family: "PT Sans", sans-serif;
}

.gm-commission {
	font-family: "PT Sans", sans-serif;
	color: var(--scc-gold);
	font-weight: 700;
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border-bottom: 2px solid var(--scc-gold-deco);
	padding-bottom: 0.25rem;
}

.gm-calendrier {
	font-family: "PT Sans", sans-serif;
	font-weight: 700;
	color: var(--scc-marine);
}

.gm-table-evt thead th {
	background-color: var(--scc-marine);
	color: #fff;
	font-family: "Oswald", sans-serif;
	font-weight: 400;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	vertical-align: middle;
	border-color: var(--scc-marine);
}

.gm-table-evt tbody td {
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
	vertical-align: top;
	border-color: var(--scc-border);
}

.gm-table-evt tbody tr:nth-child(even) > td {
	background-color: var(--scc-tab-row-even);
}

.gm-table-evt tbody tr:hover > td {
	background-color: var(--scc-hover-bg);
}

.gm-table-evt a {
	color: var(--scc-gold);
}

.gm-table-evt a:hover {
	color: var(--scc-marine);
}

.gm-evt-annule td {
	background-color: var(--scc-danger-bg) !important;
}

.gm-bandeau-annule {
	background-color: var(--scc-danger) !important;
	color: #fff;
	text-align: center;
	font-weight: 700;
}

/* ---------- Loader global (barre de progression club, cf. components/spinner.js) ---------- */

#global-loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 9999;
	pointer-events: none;
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.15s ease;
}

#global-loader.active {
	opacity: 1;
}

#global-loader::after {
	content: '';
	position: absolute;
	top: 0;
	left: -40%;
	width: 40%;
	height: 100%;
	background: var(--scc-gold-deco);
	border-radius: 0 2px 2px 0;
	animation: global-loader-slide 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes global-loader-slide {
	0%   { left: -40%; }
	100% { left: 100%; }
}

/* ---------- États vide / attente ---------- */

.gm-etat-vide {
	background: var(--scc-bg-card);
	border: 1px dashed var(--scc-border-mid);
	border-radius: 0;
	color: var(--scc-text-muted);
	font-family: "PT Sans", sans-serif;
	text-align: center;
	padding: 2.5rem 1rem;
}

.gm-etat-vide .fa-search,
.gm-etat-vide .fa-triangle-exclamation {
	font-size: 2rem;
	color: var(--scc-gold-deco);
}

.spinner-border.text-primary {
	color: var(--scc-gold) !important;
}

/* ---------- Stepper (cycle de vie + mode étapes) ---------- */

.gm-stepper {
	display: flex;
	gap: 0;
	list-style: none;
	padding: 0;
	margin: 0;
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
}

.gm-stepper li {
	flex: 1;
	text-align: center;
	padding: 0.5rem 0.25rem;
	border-bottom: 3px solid var(--scc-border);
	color: var(--scc-text-muted);
}

.gm-stepper li.fait {
	border-bottom-color: var(--scc-gold-deco);
	color: var(--scc-gold);
}

.gm-stepper li.courant {
	border-bottom-color: var(--scc-gold);
	color: var(--scc-marine);
	font-weight: 700;
}

/* Navigation du mode étapes (onglets cliquables) */
.gm-etapes .nav-link {
	font-family: "PT Sans", sans-serif;
	font-weight: 700;
	color: var(--scc-text-muted);
	border-radius: 0;
	border-bottom: 3px solid transparent;
}

.gm-etapes .nav-link.active {
	background: none;
	color: var(--scc-marine);
	border-bottom-color: var(--scc-gold);
}

.gm-etapes .nav-link:disabled {
	opacity: 0.4;
}

/* ---------- Carte contact (organisateur sélectionné, lecture seule) ---------- */

.gm-carte-contact {
	background: var(--scc-bg-card);
	border: 1px solid var(--scc-border);
	border-left: 4px solid var(--scc-gold);
	padding: 1rem 1.25rem;
	font-family: "PT Sans", sans-serif;
}

.gm-carte-contact-nom {
	font-weight: 700;
	color: var(--scc-marine);
	font-size: 1.05rem;
	margin-bottom: 0.5rem;
}

.gm-carte-contact-corps > div {
	color: var(--scc-text);
	padding: 0.1rem 0;
}

.gm-carte-contact-corps i {
	color: var(--scc-gold);
	width: 1rem;
	text-align: center;
}

/* ---------- Page de connexion ---------- */

.gm-login-card {
	background: var(--scc-bg-card);
	border: 1px solid var(--scc-border);
	border-top: 4px solid var(--scc-gold);
	width: 100%;
	max-width: 560px;
	padding: 2rem 2.5rem;
	margin: 0 1rem;
}

.gm-login-marque {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.75rem;
}

.gm-login-marque img {
	height: 72px;
}

.gm-login-marque .gm-titre-appli {
	color: var(--scc-gold);
}

.gm-login-titre {
	font-family: "PT Sans", sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--scc-marine);
	margin: 0;
}

.gm-login-legende {
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
	font-weight: 700;
	text-align: center;
	float: none;
	width: auto;
	margin-bottom: 0.5rem;
}

.gm-login-liens {
	display: flex;
	justify-content: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--scc-border);
	font-size: 0.8125rem;
}

.gm-login-liens .link {
	color: var(--scc-gold);
}

.gm-login-liens .link:hover {
	color: var(--scc-marine);
}

@media (max-width: 576px) {
	.gm-login-card {
		padding: 1.25rem;
	}
}

/* ---------- Pied (marine, comme le club) ---------- */

.gm-pied {
	background-color: var(--scc-marine);
	color: #F8F8F9;
	text-transform: uppercase;
	border-top: none;
	margin-top: 50px;
}

/* ===== Saisie des jurys (assistant discipline par discipline) ===== */
.jury-discipline { background: #fff; }
.jury-chip { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 500; }
.jury-chip-verrou { opacity: .75; }
.jury-chip .btn-close-sm { width: .6rem; height: .6rem; padding: .2rem; background-size: .6rem; }
.jury-membre-fonction { font-weight: 400; }

/* ---------- Manuels utilisateur (/aide) ---------- */

.gm-aide {
	font-family: "Oswald", sans-serif;
	font-weight: 300;
	line-height: 1.6;
}

.gm-aide h2 {
	font-family: "PT Sans", sans-serif;
	font-size: 1.25rem;
	color: var(--scc-marine);
	border-bottom: 2px solid var(--scc-gold-deco);
	padding-bottom: 0.25rem;
	margin: 2.25rem 0 1rem;
}

.gm-aide h3 {
	font-family: "PT Sans", sans-serif;
	font-size: 1.05rem;
	color: var(--scc-gold);
	margin: 1.5rem 0 0.5rem;
}

/* Sommaire */
.gm-aide-sommaire {
	background: var(--scc-bg-card);
	border: 1px solid var(--scc-border);
	border-left: 4px solid var(--scc-gold-deco);
	padding: 1rem 1.25rem;
}

.gm-aide-sommaire ol {
	margin: 0;
	padding-left: 1.25rem;
}

.gm-aide-sommaire a {
	color: var(--scc-text);
	text-decoration: none;
}

.gm-aide-sommaire a:hover {
	color: var(--scc-gold);
	text-decoration: underline;
}

/* Figures : captures d'écran */
.gm-aide figure {
	margin: 1rem 0 1.5rem;
	background: var(--scc-bg-card);
	border: 1px solid var(--scc-border);
	padding: 0.5rem;
}

.gm-aide figure img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--scc-border);
}

.gm-aide figcaption {
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
	color: var(--scc-text-muted);
	padding-top: 0.5rem;
}

/* Capture non encore générée : on remplace l'image par un repère discret */
.gm-aide figure.gm-aide-sans-image img {
	display: none;
}

.gm-aide figure.gm-aide-sans-image::before {
	content: "Capture d'écran à générer (voir e2e/README.md — npm run captures)";
	display: block;
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
	color: var(--scc-text-muted);
	background: var(--scc-bg);
	border: 1px dashed var(--scc-border-mid);
	padding: 2rem 1rem;
	text-align: center;
}

/* Encadrés */
.gm-aide-note,
.gm-aide-attention {
	font-family: "PT Sans", sans-serif;
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	margin: 1rem 0;
	border-left: 4px solid var(--scc-gold-deco);
	background: var(--scc-hover-bg);
}

.gm-aide-attention {
	border-left-color: var(--scc-danger);
	background: var(--scc-danger-bg);
}

/* Fil des étapes d'un workflow */
.gm-aide-etapes {
	list-style: none;
	counter-reset: etape;
	padding: 0;
	margin: 0 0 1rem;
}

.gm-aide-etapes > li {
	counter-increment: etape;
	position: relative;
	padding: 0 0 0.75rem 2.25rem;
	border-left: 2px solid var(--scc-border);
	margin-left: 0.75rem;
}

.gm-aide-etapes > li:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}

.gm-aide-etapes > li::before {
	content: counter(etape);
	position: absolute;
	left: -0.85rem;
	top: 0;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--scc-gold);
	color: #fff;
	font-family: "PT Sans", sans-serif;
	font-size: 0.8125rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Impression : le manuel doit sortir proprement en PDF depuis le navigateur */
@media print {
	.gm-entete,
	.gm-pied,
	.gm-aide-impression,
	#global-loader {
		display: none !important;
	}

	.gm-aide {
		font-size: 11pt;
	}

	.gm-aide h2 {
		page-break-after: avoid;
	}

	.gm-aide figure,
	.gm-aide-note,
	.gm-aide-attention {
		page-break-inside: avoid;
	}
}

/* ===== Modale de contact (lot CONTACT Zendesk) ===== */
.gm-drop-zone {
	border: 2px dashed var(--scc-border-mid);
	background: var(--scc-bg);
	color: var(--scc-text-muted);
	padding: 1rem;
	text-align: center;
	cursor: pointer;
}
.gm-drop-zone:hover,
.gm-drop-zone:focus-visible,
.gm-drop-zone.survol {
	border-color: var(--scc-gold-deco);
	background: var(--scc-hover-bg);
	color: var(--scc-text);
}

/* La modale de contact vit dans le bandeau (fin du fragment entete-auth) :
   elle ne doit pas heriter du texte blanc de .gm-entete. */
#modalContact .modal-content {
	color: var(--scc-text);
}
