/* =====================================================================
 * Page "Histoire & patrimoine" (page-histoire.php) + bloc décennie partagé
 * (template-parts/blocks-histoire/decade-block.php, aussi utilisé en mode
 * compact par front-page.php) — chargés ensemble par inc/enqueue.php sur
 * is_page_template('page-histoire.php') || is_front_page().
 *
 * Reproduction fidèle de la maquette `site internet/rubrique histoire.html`.
 * N'utilise que les tokens définis dans tokens.css (--orange, --noir, etc.)
 * et la classe utilitaire générique `.container` de base.css ; ne redéfinit
 * aucune règle de base.css / components.css.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * Hero histoire
 * ------------------------------------------------------------------- */
.hero-histoire {
	position: relative;
	/* Même trick que .hero (front-page.css) : annule le padding-top: var(--nav-h)
	   global du body pour que le fond sombre remonte sous la nav fixe. */
	margin-top: calc(-1 * var(--nav-h));
	aspect-ratio: 2400 / 893;
	display: flex;
	align-items: flex-end;
	padding: var(--nav-h) 40px 72px;
	overflow: hidden;
}
.hero-histoire-bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(10,10,8,.94) 0%, rgba(10,10,8,.45) 45%, rgba(10,10,8,.2) 100%),
		radial-gradient(ellipse 75% 60% at 75% 30%, #3a2800 0%, #1a1008 60%, #0a0a08 100%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
}
.hero-histoire-svg {
	position: absolute;
	right: 6%;
	bottom: 8%;
	z-index: 1;
	width: min(460px, 44vw);
	opacity: .14;
}
.hero-histoire-content { position: relative; z-index: 2; max-width: 760px; }

.breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: rgba(255,255,255,.4);
	margin-bottom: 24px;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.breadcrumb a { color: rgba(255,255,255,.6); transition: color .2s; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { color: rgba(255,255,255,.25); }
.breadcrumb .is-current { color: rgba(255,255,255,.85); }

.hero-histoire-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,.10);
	border: 1px solid rgba(255,255,255,.22);
	color: var(--blanc);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 6px 16px;
	border-radius: 40px;
	margin-bottom: 24px;
	backdrop-filter: blur(6px);
}
.hero-histoire-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: to-hist-pulse 2s infinite; }
@keyframes to-hist-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }

.hero-histoire-title {
	font-family: var(--font-display);
	font-size: clamp(46px, 6.4vw, 96px);
	font-weight: 800;
	line-height: .95;
	text-transform: uppercase;
	letter-spacing: -.01em;
	color: var(--blanc);
	margin-bottom: 22px;
}
.hero-histoire-title em { font-style: normal; color: var(--orange); }
.hero-histoire-sub {
	font-size: clamp(14px, 1.4vw, 17px);
	font-weight: 300;
	color: rgba(255,255,255,.65);
	line-height: 1.65;
	max-width: 520px;
	margin-bottom: 20px;
}
.hero-histoire-stats { display: flex; gap: 40px; margin-top: 32px; flex-wrap: wrap; }
.hh-stat-n { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--orange); line-height: 1; }
.hh-stat-l { font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }

/* ---------------------------------------------------------------------
 * Bloc décennie (template-parts/blocks-histoire/decade-block.php)
 * ------------------------------------------------------------------- */
.decade-block { padding: 96px 0; }
.decade-block:nth-of-type(odd) { background: var(--blanc); }
.decade-block:nth-of-type(even) { background: var(--creme); }

.history-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.history-layout.reverse .history-visual { order: 2; }
.history-visual { position: relative; }
.history-content { min-width: 0; }

.history-img-main {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.history-img-main--photo { overflow: hidden; }
.history-img-real { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.history-img-ph {
	font-family: var(--font-display);
	font-size: 80px;
	font-weight: 800;
	color: rgba(255,255,255,.08);
	text-transform: uppercase;
}
.history-badge-flottant {
	position: absolute;
	bottom: -24px;
	right: -24px;
	background: var(--orange);
	color: var(--blanc);
	border-radius: 4px;
	padding: 20px 24px;
	text-align: center;
}
.history-layout.reverse .history-badge-flottant { right: auto; left: -24px; }
.history-badge-n { font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 1; }
.history-badge-n sup { font-size: 16px; }
.history-badge-l { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-top: 4px; }

/* Fonds dégradés simulés par décennie (repris de la maquette) */
.hbg-1910 { background: linear-gradient(135deg, #1e1408 0%, #3d2c05 100%); }
.hbg-1920 { background: linear-gradient(135deg, #1a1508 0%, #382a08 100%); }
.hbg-1930 { background: linear-gradient(135deg, #17140f 0%, #302818 100%); }
.hbg-1940 { background: linear-gradient(135deg, #14140f 0%, #2a2a1a 100%); }
.hbg-1950 { background: linear-gradient(135deg, #1e1008 0%, #3d2005 100%); }
.hbg-1960 { background: linear-gradient(135deg, #1c1206 0%, #3a2608 100%); }
.hbg-1970 { background: linear-gradient(135deg, #100f0a 0%, #2c2412 100%); }
.hbg-1980 { background: linear-gradient(135deg, #150e08 0%, #331f0d 100%); }
.hbg-1990 { background: linear-gradient(135deg, #0d120c 0%, #1f2d18 100%); }
.hbg-2000 { background: linear-gradient(135deg, #0a1520 0%, #1a3040 100%); }
.hbg-default { background: linear-gradient(135deg, var(--gris-fonce) 0%, var(--noir) 100%); }

/* Étiquette décennie + titre/chapeau de section (réutilisés par le hero héritage) */
.decade-tag {
	display: inline-block;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--blanc);
	background: var(--orange);
	padding: 5px 14px;
	border-radius: 30px;
	margin-bottom: 18px;
}
.section-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--orange);
	margin-bottom: 14px;
}
.section-title {
	font-family: var(--font-display);
	font-size: clamp(34px, 4vw, 56px);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -.01em;
	line-height: 1;
	color: var(--noir);
	margin-bottom: 14px;
}
.section-sub { font-size: 15px; font-weight: 300; color: var(--gris-mid); line-height: 1.6; max-width: 520px; margin-bottom: 32px; }

/* Frise chronologique inline (2-3 événements datés par décennie).
 * Puce/trait alignés comme sur l'accueil (assets/css/header-footer.css et
 * l'ex-front-page.css) : le fichier "rubrique histoire.html" d'origine
 * codait left:25px/29px (puce chevauchant la 1ère lettre du titre) ; valeurs
 * remplacées ici à la demande explicite de l'utilisateur pour que la puce
 * reste dans la marge, comme sur la page d'accueil. */
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 30px; }
.timeline-item { display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding-bottom: 26px; position: relative; }
.timeline-item::before {
	content: '';
	position: absolute;
	left: 83px;
	top: 28px;
	bottom: 0;
	width: 1px;
	background: rgba(0,0,0,.1);
}
.timeline-item:last-child::before { display: none; }
.timeline-year { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--orange); letter-spacing: .04em; padding-top: 2px; text-align: right; }
.timeline-item-body { position: relative; padding-left: 22px; }
.timeline-dot {
	position: absolute;
	left: 3px;
	top: 6px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--orange);
	border: 2px solid var(--blanc);
	box-shadow: 0 0 0 2px var(--orange);
}
.timeline-text-title { font-size: 14px; font-weight: 600; color: var(--noir); margin-bottom: 3px; }
.timeline-text-sub { font-size: 13px; color: var(--gris-mid); line-height: 1.5; }

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* Mode compact — section "Histoire condensée" de l'accueil, fond sombre
 * hérité de la section .section-dark qui l'entoure dans front-page.php. */
.decade-block--compact {
	padding: 0 0 56px;
	background: transparent !important;
}
.decade-block--compact .section-title { color: var(--blanc); }
.decade-block--compact .section-sub { color: var(--gris-light); }
.decade-block--compact .timeline-text-title { color: var(--blanc); }
.decade-block--compact .timeline-text-sub { color: rgba(255,255,255,.55); }
.decade-block--compact .timeline-item::before { background: rgba(255,255,255,.14); }
.decade-block--compact .timeline-dot { border-color: var(--noir); }

/* ---------------------------------------------------------------------
 * Bande chiffres clés (fond noir)
 * ------------------------------------------------------------------- */
.stats-band {
	background: var(--noir);
	padding: 72px 40px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	text-align: center;
}
.stat-block { padding: 0 20px; }
.stat-n { font-family: var(--font-display); font-size: clamp(40px, 4vw, 56px); font-weight: 800; color: var(--orange); line-height: 1; }
.stat-l { font-size: 12px; color: rgba(255,255,255,.5); letter-spacing: .06em; text-transform: uppercase; margin-top: 10px; }

/* ---------------------------------------------------------------------
 * Héritage aujourd'hui
 * ------------------------------------------------------------------- */
.legacy-section { padding: 96px 40px; }
.legacy-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.legacy-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.legacy-cards { display: flex; flex-direction: column; gap: 16px; }
.legacy-card {
	background: var(--blanc);
	border: 1px solid rgba(0,0,0,.08);
	border-radius: 6px;
	padding: 22px 24px;
	display: flex;
	gap: 18px;
	align-items: flex-start;
	transition: transform .2s var(--ease), border-color .2s;
}
.legacy-card:hover { transform: translateX(4px); border-color: var(--orange); }
.legacy-icon {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(232,104,26,.12);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.legacy-icon svg { width: 18px; color: var(--orange); }
.legacy-card-title { font-size: 14px; font-weight: 600; color: var(--noir); margin-bottom: 4px; }
.legacy-card-sub { font-size: 13px; color: var(--gris-mid); line-height: 1.5; }

/* Boutons pilule spécifiques à la maquette Histoire (n'existent pas
 * ailleurs sur le site : ne pas confondre avec .btn / .btn--primary). */
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--orange);
	color: var(--blanc);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 14px 28px;
	border-radius: 40px;
	transition: background .2s, transform .2s var(--ease);
}
.btn-primary:hover { background: var(--orange-dk); transform: scale(1.04); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-ghost-dark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 1px solid rgba(0,0,0,.18);
	color: var(--noir);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 14px 28px;
	border-radius: 40px;
	transition: border-color .2s, background .2s;
}
.btn-ghost-dark:hover { border-color: var(--noir); background: var(--creme); }

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.history-layout { grid-template-columns: 1fr; }
	.history-layout.reverse .history-visual { order: 0; }
	.history-badge-flottant,
	.history-layout.reverse .history-badge-flottant { right: 0; left: auto; bottom: -20px; }
	.stats-band { grid-template-columns: repeat(2, 1fr); }
	.legacy-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
	/* Le ratio panoramique du desktop (2400/893) ne laisse que ~145px de haut
	   sur téléphone : le contenu débordait sous la nav. Hauteur libre ici. */
	.hero-histoire { aspect-ratio: auto; min-height: 560px; padding: calc(var(--nav-h) + 32px) 20px 44px; }
	.hero-histoire-svg { width: 60vw; opacity: .08; }
	.hero-histoire-badge { font-size: 10px; padding: 6px 12px; }
	.hero-histoire-title { font-size: clamp(40px, 12vw, 48px); }
	.hero-histoire-stats { flex-wrap: nowrap; justify-content: space-between; gap: 12px; margin-top: 24px; }
	.hh-stat-n { font-size: 30px; }
	.hh-stat-l { font-size: 10px; }
	.decade-block { padding: 60px 0; }
	.legacy-section { padding: 60px 20px; }
	.stats-band { grid-template-columns: 1fr 1fr; padding: 48px 20px; gap: 28px; }
}
