/* ==========================================================================
   At Home Bière - Refonte 2026
   Tokens, base, composants. Polices : voir ../fonts2026/fonts.css
   ========================================================================== */

:root {
	/* Couleurs (relevées sur les maquettes) */
	--brand-900: #3f0a09;
	--brand-800: #4f0e0c;
	--brand-700: #5e1210;   /* boutons principaux */
	--brand-600: #6e1a14;   /* bandeaux */
	--orange: #e2571c;      /* pictogrammes, CTA secondaires, prix */
	--orange-600: #c9461a;
	--orange-text: #b13d12;    /* orange pour TEXTE sur fonds clairs : 5.5:1 sur creme (AA) */
	--orange-solid: #c2410c;   /* fond orange portant du texte blanc : 5.2:1 (AA) */
	--orange-solid-hover: #9a3412;
	--red: #b02a1b;         /* sur-titres */
	--cream: #fcf6f1;       /* fonds de sections */
	--cream-2: #f6ebe1;     /* cartes */
	--sand: #e0d6cb;        /* placeholders d'images */
	--ink: #16161a;         /* titres (noir) */
	--text: #3a3a44;
	--muted: #5f5a66;          /* 6.2:1 sur creme, 5.7:1 sur cream-2 (AA) */
	--line: #eadfd5;
	--footer: #2a2a2a;
	--white: #fff;

	/* Typographies */
	--font-title: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--font-hand: 'Caveat', 'Comic Sans MS', cursive;

	/* Espacements, rayons, ombres */
	--gutter: clamp(16px, 4vw, 40px);
	--container: 1200px;
	--radius: 6px;
	--radius-lg: 14px;
	--shadow: 0 6px 24px rgba(60, 20, 10, .08);
	--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--white); color: var(--text);
	font: 400 16px/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 {
	font-family: var(--font-title); font-weight: 600; color: var(--ink);
	line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section--cream { background: var(--cream); }
.section--dark { background: var(--brand-600); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Sur-titre en capitales (Inter, espacé) */
.eyebrow {
	display: block; font: 700 .78rem/1.2 var(--font-body); letter-spacing: .18em;
	text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.lead { font-size: 1.125rem; color: var(--text); max-width: 56ch; }
.hand { font-family: var(--font-hand); color: var(--red); font-weight: 700; }
.card .hand { font-size: 1.4rem; line-height: 1.2; }

/* Icônes (sprite SVG) */
.icon { width: 1.15em; height: 1.15em; fill: currentColor; stroke: none; flex: none; }
.icon--xl { width: 48px; height: 48px; stroke-width: 1.4; color: var(--orange); }

/* Boutons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 14px 22px; border-radius: var(--radius); border: 2px solid transparent;
	font: 700 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand-700); color: #fff; }
.btn--primary:hover { background: var(--brand-900); }
.btn--outline { background: #fff; color: var(--brand-700); border-color: var(--orange); }
.btn--outline:hover { background: var(--cream-2); }
.btn--orange { background: var(--orange-solid); color: #fff; }
.btn--orange:hover { background: var(--orange-solid-hover); }
.btn--sm { padding: 11px 16px; font-size: .85rem; }
.btn--lg { padding: 18px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.link-arrow { font-weight: 700; color: var(--orange-text); text-decoration: none; }
.link-arrow::after { content: ' \2192'; }

/* Placeholders d'images (à remplacer par les visuels) */
.ph {
	display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center;
	background: var(--sand); color: #5c4f45; min-height: 220px; width: 100%; padding: 16px;
	font: 500 .8rem/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
	border-radius: var(--radius);
}
.ph .icon { width: 56px; height: 56px; stroke-width: 1.2; }
.ph--hero { border-radius: 0; min-height: 100%; }
.ph--wide { min-height: 260px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.site-header .logo { display: block; flex: none; padding: 10px 0; }
.site-header .logo img { display: block; height: 60px; width: auto; }
.site-nav { flex: 1; }
.site-nav > ul { display: flex; justify-content: center; gap: clamp(14px, 2vw, 32px); }
.site-nav a { display: block; padding: 8px 2px; font-size: .88rem; white-space: nowrap; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand-700); border-bottom-color: var(--brand-700); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.header-tools .tool { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); border-radius: 50%; }
.header-tools .tool:hover { background: var(--cream-2); }
.header-tools .sep { width: 1px; height: 32px; background: var(--line); margin-inline: 4px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: var(--cream); }
.hero .grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 440px; }
.hero .copy { display: flex; flex-direction: column; justify-content: center; padding: 56px var(--gutter) 56px max(var(--gutter), calc((100vw - var(--container)) / 2)); }
.hero .copy .lead { margin-bottom: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .media { min-height: 320px; }
.hero .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb span { margin-inline: 6px; }

/* ---------- Bandeau de pictogrammes ---------- */
.features { padding-block: 28px; }
.features ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.features li { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-left: 1px solid var(--line); }
.features li:first-child { border-left: 0; }
.features .icon { width: 44px; height: 44px; stroke-width: 1.4; color: var(--orange); }
.features b { display: block; color: var(--ink); font-size: .95rem; line-height: 1.3; }
.features small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }

/* ---------- Cartes ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: stretch; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream-2); }
.panel .copy { padding: 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.panel .copy .eyebrow { color: var(--ink); }
.panel--grey { background: #e6e6e8; }
.panel .ph { border-radius: 0; min-height: 220px; height: 100%; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.card .ph { border-radius: 0; min-height: 150px; }
.card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card .link-arrow { margin-top: auto; padding-top: 8px; font-size: .9rem; }
.card--link { text-decoration: none; transition: box-shadow .2s, transform .2s; }
.card--link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.bands { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.band { display: flex; gap: 24px; align-items: center; background: var(--cream-2); border-radius: var(--radius-lg); padding: 28px; }
.band h3 { margin-bottom: 6px; }
.band p { color: var(--muted); margin-bottom: 10px; }

.cta-band { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: center; background: var(--cream-2); border-radius: var(--radius-lg); overflow: hidden; }
.cta-band .ph { border-radius: 0; min-height: 200px; height: 100%; }
.cta-band .copy { padding: 28px 28px 28px 0; }

/* ---------- Actualités ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.news-card .thumb { aspect-ratio: 16 / 10; background: var(--sand) center / cover no-repeat; border-radius: var(--radius-lg); }
.news-card .cat { font: 700 .72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.news-card h3 { margin: 0; }
.news-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Contenu éditorial (pages CMS / BO) ---------- */
.page-wrap { padding-block: 40px 64px; }
.page-text-wrapper { max-width: 860px; }
.page-text-wrapper h2, .page-text-wrapper h3 { margin-top: 1.4em; }
.page-text-wrapper img { border-radius: var(--radius); }
.page-text-wrapper table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.page-text-wrapper td, .page-text-wrapper th { border: 1px solid var(--line); padding: 8px 12px; }
.page-text-column { display: inline-block; vertical-align: top; width: 48%; margin-right: 2%; }
a[data-link-type="cms-styled-button"] {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius);
	background: var(--brand-700); color: #fff; font-weight: 700; text-decoration: none;
}
a[data-link-type="cms-styled-button"]:hover { background: var(--brand-900); }
.message-error { background: #fdecea; color: #8a1c14; border: 1px solid #f4bcb6; padding: 12px 16px; border-radius: var(--radius); margin-block: 16px; }
.message-confirmation { background: #eaf6ec; color: #1c5a2b; border: 1px solid #b9dcc1; padding: 12px 16px; border-radius: var(--radius); margin-block: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #d8d4d0; font-size: .9rem; }
.site-footer .top { display: grid; grid-template-columns: 200px repeat(3, 1fr) 1.3fr; gap: 32px; padding-block: 44px 28px; }
.site-footer .logo img { height: 64px; width: auto; display: block; filter: brightness(0) invert(1); }
.site-footer h2 { font: 700 .95rem/1.3 var(--font-body); color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .social { display: flex; gap: 14px; margin-top: 14px; }
.site-footer .social a { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; }
.site-footer .addr b { color: #fff; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid #444; padding-block: 18px; font-size: .8rem; color: #aaa; }
.site-footer .bottom a { margin-inline: 4px; }
.site-footer .legal-alcool { flex-basis: 100%; font-size: .9rem; color: #e6e2de; padding-top: 6px; }
.site-footer .legal-alcool strong { color: #fff; font-weight: 600; }

/* ---------- Pop-up majorité (ids conservés pour jscripts.php) ---------- */
#overlay { display: none; position: fixed; inset: 0; background: rgba(20, 8, 6, .72); z-index: 900; }
#popup-disclaimer {
	position: fixed; z-index: 1000; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: min(92vw, 420px); background: #fff; border-radius: var(--radius-lg); padding: 28px; text-align: center; box-shadow: var(--shadow);
}
#popup-disclaimer img { width: 64px; height: auto; }
#popup-disclaimer a { display: inline-block; margin-top: 8px; padding: 14px 22px; background: var(--brand-700); color: #fff; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
#back-to-top { display: none; position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-700); cursor: pointer; z-index: 40; }
#back-to-top::after { content: '\2191'; color: #fff; display: grid; place-items: center; height: 100%; font-size: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.site-nav > ul { gap: 14px; }
	.cards { grid-template-columns: repeat(2, 1fr); }
	.site-footer .top { grid-template-columns: 1fr 1fr 1fr; }
	.site-footer .top .logo { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.nav-toggle { display: grid; place-items: center; margin-left: auto; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
		border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px var(--gutter) 20px;
	}
	.site-nav.is-open { display: block; }
	.site-nav > ul { flex-direction: column; gap: 0; }
	.site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
	.header-tools .btn span { display: none; }
	.header-tools .btn { padding: 11px; }
	.header-tools .sep { display: none; }
	.hero .grid { grid-template-columns: 1fr; }
	.hero .copy { padding: 40px var(--gutter); }
	.hero .media { order: -1; min-height: 220px; }
	.features ul { grid-template-columns: 1fr 1fr; }
	.features li:nth-child(odd) { border-left: 0; }
	.split, .bands, .panel, .cta-band, .news-grid { grid-template-columns: 1fr; }
	.cta-band .copy { padding: 0 24px 28px; }
	.page-text-column { width: 100%; margin: 0; }
}
@media (max-width: 560px) {
	.site-header .logo img { height: 48px; }
	.cards, .features ul { grid-template-columns: 1fr; }
	.features li { border-left: 0; }
	.site-footer .top { grid-template-columns: 1fr 1fr; }
	.band { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Contenu edite dans le back-office : couleurs orange ecrites en dur dans le HTML (#ff6600, #ee721a), trop claires sur fond clair (< 3:1).
   On les remplace par l'orange texte AA, sans toucher au contenu. */
.page-text-wrapper [style*="color:#ff6600" i], .page-text-wrapper [style*="color: #ff6600" i],
.page-text-wrapper [style*="color:#ee721a" i], .page-text-wrapper [style*="color: #ee721a" i],
.page-text-wrapper [style*="color:rgb(255, 102, 0)" i], .page-text-wrapper [style*="color: rgb(255, 102, 0)" i],
.page-text-wrapper [style*="color:rgb(238, 114, 26)" i], .page-text-wrapper [style*="color: rgb(238, 114, 26)" i],
.page-text-wrapper font[color="#ff6600" i], .page-text-wrapper font[color="#ee721a" i] { color: var(--orange-text) !important; }
