/* ==========================================================
   Gabarit responsive du site de l'Amicale (v2)
   Chargé après bootstrap.min.css et les anciens styles.
   ========================================================== */

:root{
	--rouge: #b3151b;
	--rouge-fonce: #7f0f13;
	--or: #f5c518;
	--sombre: #1d1d1f;
	--fond: #f3f1ee;
	--texte: #222;
	--gris: #6b6b6b;
	--rayon: 12px;
	--ombre: 0 6px 20px rgba(0,0,0,.08);
	--police: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}

html{ height:auto; }
body{
	font: 15px/1.55 var(--police);
	color: var(--texte);
	background: var(--fond);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-text-size-adjust: 100%;
}
img{ max-width:100%; height:auto; }
p{ margin-bottom:.75rem; }
h1{ font-size:1.9rem; font-weight:700; margin:.25rem 0 1rem; }
h1 u, u h1{ text-decoration:none; }
a{ color: var(--rouge); }
a:hover{ color: var(--rouge-fonce); }

/* ---------- En-tête ---------- */
.site-banner{
	position: relative;
	background: var(--sombre) url('/assets/image/background.jpg') center 35% / cover no-repeat;
	color: #fff;
}
.site-banner::before{
	content:""; position:absolute; inset:0;
	background: linear-gradient(90deg, rgba(20,0,0,.85) 0%, rgba(80,5,8,.55) 55%, rgba(0,0,0,.25) 100%);
}
.site-banner .container{ position:relative; display:flex; align-items:center; gap:1.25rem; padding-top:1.25rem; padding-bottom:1.25rem; }
.site-banner img{ height:110px; width:auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.site-banner .titre{ font-size:2.1rem; line-height:1.15; font-weight:700; color:var(--or); text-shadow:0 2px 8px rgba(0,0,0,.6); margin:0; }
.site-banner .sous-titre{ color:#f1e7d0; margin:.35rem 0 0; font-size:1rem; }
.site-banner a{ color:inherit; text-decoration:none; display:flex; align-items:center; gap:1.25rem; }

.site-nav{ background: var(--rouge); box-shadow: 0 2px 8px rgba(0,0,0,.2); position:sticky; top:0; z-index:1030; }
.site-nav .navbar{ padding:.35rem 0; }
.site-nav .navbar-brand{ display:none; color:#fff; font-weight:700; font-size:1.05rem; align-items:center; gap:.5rem; }
.site-nav .navbar-brand img{ height:38px; width:auto; }
.site-nav .nav-link{ color:rgba(255,255,255,.92) !important; font-weight:500; padding:.55rem .9rem !important; border-radius:8px; }
.site-nav .nav-link:hover, .site-nav .nav-item.active .nav-link{ background: rgba(0,0,0,.18); color:#fff !important; }
.site-nav .btn-adherent{ background: var(--or); color: var(--sombre) !important; font-weight:700; }
.site-nav .btn-adherent:hover{ background:#ffd84a; color: var(--sombre) !important; }
.site-nav .navbar-toggler{ border-color: rgba(255,255,255,.5); }

/* ---------- Contenu ---------- */
#main{ flex:1 0 auto; width:100%; }
.site-container{ max-width:1140px; margin:0 auto; padding:1.5rem 15px 2.5rem; }
#content{
	background:#fff;
	border-radius: var(--rayon);
	box-shadow: var(--ombre);
	padding: 1.5rem;
	min-height: 300px;
}

/* Anciennes boîtes (#box) : présentation en carte */
#box, .box{
	border: 1px solid #e3e0dc !important;
	border-radius: var(--rayon);
	box-shadow: none;
	background:#fff;
	vertical-align: top;
}
#box > font:first-of-type, .box > font:first-of-type{ font-weight:600; }

.btn{ border-radius:8px; }
.btn-large{ padding:.5rem 1rem; }

/* ---------- Message (fonction deny) ---------- */
#info{
	display:none;
	position:fixed; z-index:999999;
	top:50%; left:50%; transform:translate(-50%,-50%);
	width:min(520px, calc(100vw - 32px));
	background:#fff; color:var(--texte);
	border-radius: var(--rayon);
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	padding:1.5rem 1.5rem 1rem;
	text-align:center;
	border-top: 6px solid var(--rouge);
}
#info #text{ display:block; font-size:1.1rem; margin-bottom:1rem; }
#info #text, #info #text *{ color:var(--texte) !important; }

/* ---------- Diaporama ---------- */
.site-carousel{ border-radius: var(--rayon); overflow:hidden; margin-bottom:1.5rem; background:#111; }
.site-carousel .carousel-item img{ width:100%; height:clamp(220px, 52vw, 540px); object-fit:contain; background:#111; }
.site-carousel .carousel-caption{ background: rgba(0,0,0,.55); border-radius:10px; left:8%; right:8%; bottom:1.5rem; padding:.75rem 1rem; }

/* ---------- Pied de page ---------- */
.site-footer{ flex-shrink:0; background: var(--sombre); color:#bdbdbd; padding:2rem 0 1rem; margin-top:auto; }
.site-footer h3{ color:#fff; font-size:1rem; font-weight:600; margin-bottom:.75rem; }
.site-footer a{ color:#e6e6e6; }
.site-footer a:hover{ color: var(--or); }
.site-footer .social img{ width:44px; height:44px; margin-right:.75rem; }
.site-footer .copyright{ border-top:1px solid #333; margin-top:1.5rem; padding-top:1rem; font-size:.85rem; text-align:center; }

/* ---------- Tableaux ---------- */
.table-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* ==========================================================
   Petits écrans : les anciennes largeurs fixes des pages
   (écrites dans les attributs style) sont neutralisées.
   ========================================================== */
@media (max-width: 991.98px){
	.site-banner{ display:none; }
	.site-nav .navbar-brand{ display:flex; }
	.site-nav .navbar-collapse{ padding-bottom:.5rem; }
	.site-container{ padding:1rem 10px 2rem; }
	#content{ padding:1rem; }

	#content [style*="width"]:not(img):not(input):not(select):not(button):not(textarea):not(iframe):not(.progress-bar):not(.fc *){
		width:auto !important;
		max-width:100% !important;
	}
	#content [style*="float"]{ float:none !important; }
	#content [style*="display:inline-table"], #content [style*="display: inline-table"],
	#content [style*="display:inline-block"]#box{
		display:block !important;
	}
	#content [style*="margin"]:not(.btn){ margin-left:0 !important; margin-right:0 !important; }
	#content [style*="height:"]#box, #content [style*="height:"]#desc{ height:auto !important; }
	#content #box:not([style*="display:none"]):not([style*="position:fixed"]), #content .box{ margin:0 0 1rem !important; padding:1rem !important; }
	#content [style*="position:fixed"]#box{ left:10px; right:10px; top:80px !important; margin:0 !important; z-index:1050; }

	/* Les tableaux larges défilent horizontalement au lieu de déborder */
	#content table:not(.table):not(.fc table){ display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
	#content table table{ display:table; }
	#content .fc table{ display:table !important; }
	#content table{ height:auto !important; }
	#content [style*="position:absolute"], #content [style*="position: absolute"]{ position:static !important; }
	#content input[type=text], #content input[type=email], #content input[type=password],
	#content input[type=number], #content input[type=date], #content input[type=time],
	#content input[type=tel], #content select, #content textarea{ max-width:100%; }
	#content iframe{ width:100% !important; }

	#popup{ width:calc(100vw - 20px) !important; height:auto !important; max-height:90vh; overflow:auto; left:10px !important; top:5vh !important; }
	h1{ font-size:1.5rem; }
	#content .w-50, #content .w-75{ width:100% !important; }
}

@media (max-width: 575.98px){
	#content .btn-large{ display:inline-block; margin-bottom:.4rem; }
	.site-carousel .carousel-caption{ display:none; }
}

/* Police unique (les anciennes pages imposaient Verdana, Times...) */
button, input, select, textarea, table, #content font, #content span{ font-family: var(--police); }
u:has(> h1){ text-decoration:none; }

/* ---------- Espace adhérent ---------- */
.carte-action{ transition: transform .15s, box-shadow .15s; }
a.carte-action:hover{ transform: translateY(-2px); box-shadow: var(--ombre); }
.carte-action .card-body{ padding: 1rem; }
.sondage .card-header{ background:#faf8f6; gap:.5rem; }
.sondage-question{ padding:.75rem 0; border-bottom:1px solid #eee; margin-bottom:.5rem; }
.sondage-question:last-of-type{ border-bottom:0; }
.sondage .custom-control{ padding-top:.2rem; padding-bottom:.2rem; }
.sondage .custom-control-label{ cursor:pointer; }
@media (max-width: 575.98px){
	.sondage .btn{ display:block; width:100%; }
	.sondage .custom-control{ padding-top:.4rem; padding-bottom:.4rem; }
}
.carte-action .badge{ white-space:normal; text-align:left; line-height:1.3; }

/* ---------- Gestion des sondages ---------- */
.stat .h2{ color: var(--rouge); font-weight:700; }
.editeur-sondage .question{ border-left:4px solid var(--rouge); }
.liste-sondages td{ vertical-align: middle; }
.liste-sondages .dropdown-menu form{ margin:0; }
@media (max-width: 991.98px){
	#content .table-responsive > table{ display:table; }
}

/* ---------- Impression ---------- */
@media print{
	header, .site-footer, #cookie-bar, .d-print-none{ display:none !important; }
	body{ background:#fff; }
	.site-container{ padding:0; max-width:none; }
	#content{ box-shadow:none; padding:0; }
	.tab-content > .tab-pane{ display:block !important; opacity:1 !important; margin-bottom:1.5rem; }
	.card{ break-inside: avoid; }
	.progress{ border:1px solid #999; }
	.progress-bar{ -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Gestion (pages d'administration) ---------- */
.filtre-masque{ display:none !important; }
.sticky-bottom{ position:sticky; bottom:0; z-index:10; box-shadow:0 -4px 12px rgba(0,0,0,.08); }
.table td, .table th{ vertical-align:middle; }
.filtre-statut{ display:none !important; }
/* Cotisations : couleur de la liste selon l'état */
.etat-0{ background-color:#f8d7da; border-color:#f1aeb5; }
.etat-1{ background-color:#fff3cd; border-color:#ffe08a; }
.etat-2, .etat-3, .etat-4{ background-color:#d4edda; border-color:#a3d3b0; }
.table-cotisation td{ white-space:nowrap; }
/* ---------- Chalet ---------- */
.legende span{ display:inline-block; margin-right:12px; white-space:nowrap; }
.legende i{ display:inline-block; width:14px; height:10px; border-radius:2px; margin-right:4px; vertical-align:middle; }
.choix-loc label{ margin:0; cursor:pointer; }
.choix-loc input{ position:absolute; opacity:0; }
.choix-loc span{ display:block; text-align:center; padding:.6rem .5rem; border:2px solid #dee2e6; border-radius:.4rem; line-height:1.25; font-weight:600; transition:all .15s; }
.choix-loc small{ display:block; font-weight:400; color:#6c757d; }
.choix-loc input:checked + span{ border-color:#c62828; background:#fdecea; color:#b71c1c; }
.choix-loc input:focus-visible + span{ box-shadow:0 0 0 .2rem rgba(198,40,40,.25); }
.fc .fc-toolbar-title{ font-size:1.2rem; text-transform:capitalize; }
.fc .fc-daygrid-day:not(.fc-day-disabled){ cursor:pointer; }
.opacity-50{ opacity:.5; }
/* ---------- Actualités ---------- */
.carte-actu{ transition:box-shadow .15s, transform .15s; }
.carte-actu:hover{ box-shadow:0 .5rem 1rem rgba(0,0,0,.12); transform:translateY(-2px); }
.carte-actu .card-img-top{ height:170px; object-fit:cover; }
.actualite p{ line-height:1.7; }
.recrutement p{ display:inline; margin:0; }
/* ---------- Tableau de bord ---------- */
.tuile{ transition:box-shadow .15s, transform .15s; border-radius:.6rem; }
.tuile:hover{ box-shadow:0 .5rem 1rem rgba(0,0,0,.1); transform:translateY(-2px); }
.tuile-icone{ font-size:1.8rem; line-height:1; }
@media (max-width:575.98px){ .tuile .h4{ font-size:1.15rem; } }

/* Résultats de sondage : en-tête (numéros de question) et noms toujours visibles en défilant */
.table-figee{ max-height:70vh; overflow:auto; border:1px solid #dee2e6; border-radius:.25rem; }
.table-figee table{ border-collapse:separate; border-spacing:0; }
.table-figee thead th{ position:sticky; top:0; z-index:2; background:#e9ecef; }
.table-figee tbody td:first-child, .table-figee thead th:first-child{ position:sticky; left:0; z-index:1; background:#fff; box-shadow:2px 0 0 #dee2e6; }
.table-figee thead th:first-child{ z-index:3; background:#e9ecef; }
.table-figee tbody tr:nth-of-type(odd) td:first-child{ background:#f7f7f7; }
@media print{ .table-figee{ max-height:none; overflow:visible; } }
@media print{ *{ -webkit-print-color-adjust:exact; print-color-adjust:exact; } }

/* Chalet : priorités des demandes */
.priorite{ background:#f8f9fa; border:1px solid #e9ecef; }
.critere{ display:inline-block; font-size:.78rem; padding:.1rem .45rem; margin:0 .3rem .3rem 0; border-radius:1rem; background:#fff; border:1px solid #dee2e6; }
.critere.ok{ border-color:#a3d3b0; background:#eaf6ec; color:#1e5e2d; }
.critere.ko{ border-color:#f1aeb5; background:#fbeaec; color:#8a1c27; }
.section-chalet{ border-left:4px solid #2e7d32; padding-left:.5rem; }
.section-dispense{ border-color:#6c757d; }
.section-sans{ border-color:#c62828; }
.fc .chalet-etat-0{ background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.35) 0 6px,transparent 6px 12px); }
.fiche-ok{ font-size:.75rem; color:#2e7d32; font-weight:normal; }
.fiche-ko{ font-size:.75rem; color:#b26a00; font-weight:normal; opacity:.8; }
@media (max-width:575.98px){
	.fc .fc-toolbar-title{ font-size:1.1rem; }
	.fc .fc-bg-event .fc-event-title{ display:none; }
	.fc .fc-button{ padding:.25rem .5rem; }
}
.trace{ min-width:170px; max-width:240px; font-size:.72rem; }
a:has(> .logo-sdis), .lien-sdis{ flex-shrink:0; }
.logo-sdis{ width:56px; height:56px; max-width:none; object-fit:contain; }
/* Menu téléphone : partie publique et espace membres séparés */
@media (max-width:991.98px){
	.site-nav .menu-membres{ margin-top:.5rem; padding-top:.5rem; border-top:1px solid rgba(255,255,255,.35); background:rgba(0,0,0,.12); border-radius:.4rem; padding-left:.5rem; padding-bottom:.25rem; }
	.site-nav .menu-section{ color:#ffd54f; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; padding:.25rem 0 .1rem; }
}
.fiche-cal{ position:absolute; z-index:20; width:340px; max-width:calc(100% - 16px); }
