/* Apprendre-Anglais.tv — feuille de styles unique
   Design néo-brutaliste. Aucune dépendance, aucun build. */

:root {
	--ink: #0f0f0f;
	--paper: #f4e4d4;
	--yt-red: #ff0000;
	--red: #ff3b00;
	--green: #006633;
	--yellow: #ffd400;
	--white: #fff;
	--wide: 1300px;
	--font-display: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--ink);
	background: var(--paper);
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 900;
	line-height: 1.1;
	text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
img, iframe { max-width: 100%; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.skip {
	position: absolute; left: -9999px;
	background: var(--ink); color: var(--paper); padding: 12px 20px;
	font-family: var(--font-display); font-size: 13px; text-transform: uppercase;
}
.skip:focus { left: 8px; top: 8px; z-index: 999; }

/* ---------- Bandeau défilant ---------- */

.marquee {
	background: var(--ink); color: var(--paper);
	padding: 10px 0; overflow: hidden; white-space: nowrap;
}
.marquee p {
	display: inline-block;
	font-family: var(--font-display); font-size: 14px; font-weight: 900;
	letter-spacing: 0.15em; text-transform: uppercase;
	animation: scroll 25s linear infinite;
}
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ---------- En-tête ---------- */

.header {
	position: sticky; top: 0; z-index: 100;
	background: var(--paper);
	border-bottom: 3px solid var(--ink);
	padding: 16px 0;
}
.header-inner {
	max-width: var(--wide); margin: 0 auto; padding: 0 24px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
	display: inline-flex; align-items: center;
	font-family: var(--font-display); font-size: 21px; font-weight: 900;
	letter-spacing: -0.02em; text-transform: uppercase;
}
.logo .slash { color: var(--yt-red); }
.logo .play {
	display: inline-flex; align-items: center; justify-content: center;
	width: 1.4em; height: 1em; background: var(--yt-red);
	margin-right: 0.3em; font-size: 0.7em;
}
.logo .play::after {
	content: ""; width: 0; height: 0;
	border-top: 0.3em solid transparent; border-bottom: 0.3em solid transparent;
	border-left: 0.45em solid var(--white);
}
.nav-list { list-style: none; display: flex; align-items: center; gap: 28px; }
.nav a, .nav-btn {
	font-family: var(--font-display); font-size: 13px; font-weight: 900;
	letter-spacing: 0.1em; text-transform: uppercase;
	border: 0; background: none; color: inherit; cursor: pointer;
	padding: 0; line-height: 1.4;
	border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a:focus, .nav a[aria-current="page"],
.nav-btn:hover, .nav-btn:focus { border-bottom-color: currentColor; }
.caret { display: inline-block; margin-left: 2px; transition: transform 0.15s ease-out; }

/* Sous-menu Formations */
.has-sub { position: relative; }

/* Pont invisible sous le bouton : sans lui, la souris traverse une zone
   qui n'appartient à aucun élément et le survol se rompt. */
.has-sub::after {
	content: "";
	position: absolute; top: 100%; left: 0;
	/* aussi large que le sous-menu, pour couvrir aussi les trajets en diagonale */
	width: 240px; min-width: 100%; height: 18px;
}

.sub {
	list-style: none;
	position: absolute; top: calc(100% + 14px); left: 0; z-index: 200;
	min-width: 230px; padding: 8px;
	background: var(--paper); border: 3px solid var(--ink);
	/* visibility (et non display) pour pouvoir temporiser la fermeture */
	visibility: hidden; opacity: 0;
	/* à la sortie : 250 ms sans rien, puis fondu — le temps de rejoindre le menu */
	transition: opacity 0.12s ease-out 0.25s, visibility 0s linear 0.37s;
}
.sub li { display: block; }
.sub a {
	display: block; padding: 9px 12px;
	border-bottom: 0; letter-spacing: 0.06em;
}
.sub a:hover, .sub a:focus, .sub a[aria-current="page"] {
	background: var(--ink); color: var(--paper); border-bottom: 0;
}
.sub-all { border-top: 3px solid var(--ink); margin-top: 6px; padding-top: 4px; }
.sub-all a { color: var(--red); }

/* Ouvert au clic ou au clavier */
.has-sub.open > .sub { visibility: visible; opacity: 1; transition-delay: 0s, 0s; }
.has-sub.open .caret { transform: rotate(180deg); }

/* Ouvert au simple survol, avec un délai de grâce à la sortie */
@media (hover: hover) {
	.has-sub:hover > .sub { visibility: visible; opacity: 1; transition-delay: 0s, 0s; }
	.has-sub:hover .caret { transform: rotate(180deg); }
}

/* Bouton hamburger : masqué par défaut, affiché sur écran étroit */
.nav-toggle {
	display: none;
	background: var(--ink); color: var(--paper);
	border: 0; cursor: pointer; padding: 10px 14px;
	font-family: var(--font-display); font-size: 13px;
	letter-spacing: 0.1em; text-transform: uppercase;
}

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

.btn {
	display: inline-block;
	background: var(--ink); color: var(--paper);
	padding: 11px 24px; border: 0; cursor: pointer;
	font-family: var(--font-display); font-size: 13px; font-weight: 900;
	letter-spacing: 0.1em; text-transform: uppercase;
	transition: background-color 0.1s ease-out, color 0.1s ease-out;
}
.btn:hover, .btn:focus { background: var(--red); color: var(--white); }
.btn-big { padding: 16px 32px; font-size: 14px; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover, .btn-red:focus { background: var(--ink); color: var(--paper); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover, .btn-green:focus { background: var(--ink); color: var(--paper); }
.btn-cta { padding: 19px 48px; font-size: 16px; }
.btn-cta:hover, .btn-cta:focus { background: var(--white); color: var(--ink); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- Hero ---------- */

.hero { padding: 80px 0 64px; }
.hero-grid {
	max-width: var(--wide); margin: 0 auto; padding: 0 24px;
	display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: end;
}
.kicker {
	display: flex; align-items: center; gap: 0.6em;
	font-family: var(--font-display); font-size: 29px; font-weight: 700;
	line-height: 1.1; text-transform: none; margin-bottom: 40px;
}
.kicker::before {
	content: ""; flex: none; width: 1.28em; height: 0.9em;
	background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 26"><rect width="37" height="26" rx="6" fill="%23ff0000"/><path d="M14 6l12 7-12 7z" fill="%23ffffff"/></svg>') no-repeat center / contain;
}
.hero h1 { font-size: clamp(56px, 8.5vw, 112px); line-height: 0.85; letter-spacing: -0.03em; }
.hero h1 .green { color: var(--green); }
.hero-right { text-align: right; }
.hero-right p { font-size: 19px; margin-bottom: 32px; }
.hero-right .btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Bandeau statistique ---------- */

.stat { background: var(--ink); color: var(--paper); padding: 80px 0; text-align: center; }
.stat .num {
	font-family: var(--font-display); font-size: clamp(72px, 9vw, 128px);
	font-weight: 900; line-height: 1; color: var(--yellow);
}
.stat .lbl {
	font-family: var(--font-display); font-size: 19px; font-weight: 900;
	letter-spacing: 0.2em; text-transform: uppercase; margin-top: 16px;
}

/* ---------- Titres de section ---------- */

.section { padding: 80px 0; }
.section-title {
	font-size: clamp(32px, 4vw, 40px);
	border-bottom: 3px solid var(--ink); padding-bottom: 16px;
}
.section-intro { margin-top: 24px; font-size: 19px; max-width: 720px; }

/* ---------- Lignes (parcours et leçons) ---------- */

.rows { counter-reset: row; }
.row {
	position: relative;
	display: grid; grid-template-columns: 80px 1fr 3fr 150px;
	gap: 32px; align-items: center;
	padding: 40px 0; border-bottom: 3px solid var(--ink);
	counter-increment: row;
	transition: background-color 0.1s ease-out, color 0.1s ease-out;
}
.row::before {
	content: counter(row, decimal-leading-zero);
	font-family: var(--font-display); font-size: 24px; font-weight: 900;
}
.row::after {
	content: "→";
	font-family: var(--font-display); font-size: 32px; font-weight: 900;
	text-align: right; transition: transform 0.2s ease-out;
}
.row:hover, .row:focus-within { background: var(--ink); color: var(--paper); }
.row:hover::after, .row:focus-within::after { transform: translateX(10px); }
.row h3 { font-size: clamp(21px, 2.4vw, 29px); letter-spacing: -0.02em; }
.row h3 a { outline: none; }
.row h3 a::after { content: ""; position: absolute; inset: 0; }
.row p { font-size: 16px; }
.row .done { font-size: 13px; font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.row:hover .done, .row:focus-within .done { color: var(--yellow); }

/* ---------- Méthode (4 colonnes) ---------- */

.features { background: var(--ink); color: var(--paper); }
.features-grid {
	max-width: var(--wide); margin: 0 auto;
	display: grid; grid-template-columns: repeat(4, 1fr);
}
.feature { padding: 48px 32px; border-right: 3px solid var(--paper); }
.feature:last-child { border-right: none; }
.feature .emoji { font-size: 40px; line-height: 1; margin-bottom: 16px; }
.feature h3 { font-size: 19px; letter-spacing: 0.05em; margin-bottom: 8px; }
.feature p { font-size: 14px; opacity: 0.75; }
.feature:nth-child(1) { background: var(--red); color: var(--white); }
.feature:nth-child(2) { background: var(--green); color: var(--white); }
.feature:nth-child(3) { background: var(--yellow); color: var(--ink); }
.feature:nth-child(4) { background: var(--paper); color: var(--ink); }

/* ---------- Appel à l'action ---------- */

.cta { background: var(--red); color: var(--white); padding: 96px 0; text-align: center; }
.cta h2 { font-size: clamp(40px, 5.5vw, 64px); line-height: 0.9; margin-bottom: 32px; }

/* ---------- Pied de page ---------- */

.footer { padding: 48px 0; border-top: 3px solid var(--ink); }
.footer-inner {
	max-width: var(--wide); margin: 0 auto; padding: 0 24px;
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	font-family: var(--font-display); font-size: 13px; font-weight: 900;
	letter-spacing: 0.1em; text-transform: uppercase;
}
.footer a:hover, .footer a:focus { color: var(--red); }

/* ---------- Fil d'Ariane ---------- */

.crumbs {
	font-family: var(--font-display); font-size: 13px; font-weight: 900;
	letter-spacing: 0.1em; text-transform: uppercase;
	padding: 24px 0 0;
}
.crumbs a:hover, .crumbs a:focus { color: var(--red); }
.crumbs span { opacity: 0.5; }

/* ---------- Page de leçon ---------- */

.lesson { padding: 32px 0 80px; }
.lesson-head { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.lesson h1 {
	font-size: clamp(32px, 4.5vw, 48px);
	border-bottom: 3px solid var(--ink); padding-bottom: 16px; margin-bottom: 16px;
}
.lesson-meta {
	font-family: var(--font-display); font-size: 13px; font-weight: 900;
	letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 40px;
}
.lesson-meta a { color: var(--red); }
.prose { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.prose p { font-size: 18px; margin-bottom: 20px; }
.prose h2 {
	font-size: 29px; margin: 48px 0 20px;
	border-bottom: 3px solid var(--ink); padding-bottom: 12px;
}
.prose h3 { font-size: 21px; margin: 32px 0 16px; }
.prose ul, .prose ol { margin: 0 0 20px 24px; }
.prose li { margin-bottom: 8px; font-size: 18px; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.video {
	position: relative; width: 100%; padding-top: 56.25%;
	margin: 32px 0; border: 3px solid var(--ink); background: var(--ink);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lesson-nav {
	max-width: 760px; margin: 64px auto 0; padding: 0 24px;
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Quiz ---------- */

.quiz {
	max-width: 760px; margin: 64px auto 0; padding: 0 24px;
}
.quiz-box { border: 3px solid var(--ink); background: var(--white); }
.quiz-head {
	background: var(--ink); color: var(--paper);
	padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.quiz-head h2 { font-size: 24px; }
.quiz-count { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.1em; }
.quiz-bar { display: flex; gap: 4px; padding: 16px 24px 0; }
.quiz-bar span { flex: 1; height: 8px; background: rgba(15, 15, 15, 0.15); }
.quiz-bar span.on { background: var(--ink); }
.quiz-bar span.ok { background: var(--green); }
.quiz-bar span.ko { background: var(--red); }
.quiz-body { padding: 24px; }
.quiz-q { font-family: var(--font-display); font-size: 21px; line-height: 1.25; margin-bottom: 24px; }
.quiz-opts { list-style: none; display: grid; gap: 10px; }
.quiz-opt {
	display: block; width: 100%; text-align: left;
	border: 3px solid var(--ink); background: var(--white); color: var(--ink);
	padding: 14px 18px; font-family: var(--font-body); font-size: 17px; line-height: 1.35;
	cursor: pointer; transition: background-color 0.1s ease-out, color 0.1s ease-out;
}
.quiz-opt:hover:not(:disabled) { background: var(--ink); color: var(--white); }
.quiz-opt.correct { background: var(--green); color: var(--white); border-color: var(--green); }
.quiz-opt.wrong { background: var(--red); color: var(--white); border-color: var(--red); }
.quiz-opt:disabled { cursor: default; }
.quiz-feedback {
	margin-top: 20px; padding: 16px 18px;
	border-left: 8px solid var(--ink); background: var(--paper); font-size: 17px;
}
.quiz-feedback.ok { border-left-color: var(--green); }
.quiz-feedback.ko { border-left-color: var(--red); }
.quiz-feedback b { font-family: var(--font-display); text-transform: uppercase; font-size: 14px; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }
.quiz-foot { padding: 0 24px 24px; display: flex; justify-content: flex-end; gap: 10px; }

.quiz-result { padding: 40px 24px; text-align: center; }
.quiz-score {
	font-family: var(--font-display); font-size: 88px; font-weight: 900; line-height: 1;
	color: var(--green);
}
.quiz-score.mid { color: var(--red); }
.quiz-score.low { color: var(--ink); }
.quiz-result p { font-size: 19px; margin: 16px 0 32px; }
.quiz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.quiz-review { margin-top: 32px; text-align: left; border-top: 3px solid var(--ink); padding-top: 24px; }
.quiz-review h3 { font-size: 16px; margin-bottom: 16px; }
.quiz-review li { list-style: none; margin-bottom: 14px; font-size: 16px; padding-left: 28px; position: relative; }
.quiz-review li::before { position: absolute; left: 0; font-family: var(--font-display); }
.quiz-review li.ok::before { content: "✓"; color: var(--green); }
.quiz-review li.ko::before { content: "✗"; color: var(--red); }

.noscript { border: 3px solid var(--red); padding: 20px; margin-top: 32px; }

/* ---------- Grille d'articles ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.card { border: 3px solid var(--ink); padding: 24px; background: var(--white); position: relative; transition: background-color 0.1s ease-out, color 0.1s ease-out; }
.card:hover { background: var(--ink); color: var(--paper); }
.card h3 { font-size: 21px; margin-bottom: 12px; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { font-size: 16px; }

/* ---------- Écrans étroits ---------- */

@media (max-width: 900px) {
	.features-grid { grid-template-columns: repeat(2, 1fr); }
	.feature:nth-child(2) { border-right: none; }
	.feature:nth-child(1), .feature:nth-child(2) { border-bottom: 3px solid var(--paper); }
}

@media (max-width: 780px) {
	.hero-grid { grid-template-columns: 1fr; }
	.kicker { margin-bottom: 24px; font-size: 21px; }
	.hero-right { text-align: left; }
	.hero-right .btns { justify-content: flex-start; }
	.row { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
	.row::after { display: none; }
	.features-grid { grid-template-columns: 1fr; }
	.feature { border-right: none; border-bottom: 3px solid var(--paper); }
	.feature:last-child { border-bottom: none; }
	.nav { display: none; width: 100%; }
	.nav.open { display: block; }
	.nav ul { flex-direction: column; gap: 14px; padding-top: 16px; }
	.nav-toggle { display: inline-block; }
	.header-inner { flex-wrap: wrap; }
	.quiz-score { font-size: 64px; }
	.section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.marquee p { animation: none; }
	.row::after, .btn, .quiz-opt, .card { transition: none; }
}

/* ---------- Accessibilité ---------- */

.sr-only {
	position: absolute; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Accroche et contenu de leçon ---------- */

.lead p {
	font-size: 21px; line-height: 1.45; font-weight: 400;
	margin-bottom: 16px;
}

.video-wrap { margin: 32px 0 40px; }
.video-wrap .video { margin: 0; }
.video-wrap figcaption {
	margin-top: 10px;
	font-family: var(--font-display); font-size: 12px;
	letter-spacing: 0.08em; text-transform: uppercase;
	opacity: 0.65;
}

.points { list-style: none; margin: 0 0 24px; padding: 0; }
.points li {
	position: relative;
	border-left: 5px solid var(--ink);
	padding: 4px 0 4px 18px;
	margin-bottom: 18px;
	font-size: 18px; line-height: 1.5;
}
.points li strong {
	display: block;
	font-family: var(--font-display); font-weight: 900;
	font-size: 15px; text-transform: uppercase; letter-spacing: 0.03em;
	margin-bottom: 4px;
}
.points li:nth-child(3n+1) { border-left-color: var(--red); }
.points li:nth-child(3n+2) { border-left-color: var(--green); }

/* ---------- Maillage : leçons voisines ---------- */

.related {
	max-width: 760px; margin: 56px auto 0; padding: 24px;
	border: 3px solid var(--ink); background: var(--white);
}
.related h2 { font-size: 17px; margin-bottom: 16px; }
.related ul { list-style: none; }
.related li { border-top: 1px solid rgba(15,15,15,0.18); }
.related li:first-child { border-top: 0; }
.related li a {
	display: block; padding: 11px 0; font-size: 17px; line-height: 1.35;
	text-decoration: none; color: inherit;
}
.related li a:hover, .related li a:focus { color: var(--red); }
.related-all {
	display: inline-block; margin-top: 14px;
	font-family: var(--font-display); font-size: 13px;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
}

@media (max-width: 780px) {
	.nav-list { flex-direction: column; align-items: flex-start; gap: 14px; }
	.sub {
		position: static; border: 0; padding: 8px 0 0 14px;
		min-width: 0; background: none;
		visibility: visible; opacity: 1; transition: none;
	}
	.has-sub::after { display: none; }
	.sub a { padding: 7px 0; }
	.sub-all { border-top: 0; }
	.nav-btn { pointer-events: none; }
	.caret { display: none; }
	.lead p { font-size: 19px; }
	.related { padding: 20px; }
}

/* ---------- Page 404 ---------- */

.err { text-align: center; }
.err-code {
	font-family: var(--font-display); font-size: 96px; font-weight: 900;
	line-height: 1; color: var(--red);
}
.err-title { border: 0; font-size: clamp(32px, 4vw, 40px); }
.err-text { margin: 16px auto 32px; font-size: 19px; max-width: 720px; }
.err-links { margin-top: 48px; }
