/**
 * Page de vente (landing) produit — blocs du socle (étape 6.1).
 *
 * Mêmes trois règles de conduite que `aod-cod-pages.css`, parce que ce fichier
 * part dans TOUS les clones :
 *
 *  1. AUCUNE couleur de marque. `currentColor` et gris neutres transparents
 *     (lisibles sur fond clair comme sombre). Le bouton d'appel à l'action hérite
 *     du `.button` du thème. L'habillage appartient au thème déposé par l'owner.
 *
 *  2. PROPRIÉTÉS LOGIQUES uniquement (`margin-inline`, `padding-inline`,
 *     `start`/`end`) — jamais `left`/`right`. La page bascule en RTL dès que le
 *     visiteur passe en arabe.
 *
 *  3. MOBILE D'ABORD. Le desktop est l'exception, décrite en media query.
 *
 * ⚠️ Pas de `100vw` ni de décalage négatif pour un héro pleine largeur : sur
 *    desktop, `100vw` inclut la barre de défilement (débordement horizontal), et
 *    en RTL un débordement horizontal donne l'écran blanc mobile documenté en
 *    CHECKLIST-THEME-CHILD.md §C2. Le héro remplit le conteneur du thème, point.
 */

.aod-landing {
	--aod-l-gap: clamp(2.5rem, 7vw, 4.5rem);
	--aod-l-line: color-mix(in srgb, currentColor 12%, transparent);
	display: flex;
	flex-direction: column;
	gap: var(--aod-l-gap);
	padding-block: clamp(1.5rem, 5vw, 3rem);
}

.aod-landing__block {
	scroll-margin-block-start: 1rem; /* L'ancre du formulaire ne colle pas au bord. */
}

.aod-landing__title {
	margin: 0 0 1.5rem;
	text-align: center;
	font-size: clamp(1.4rem, 4.5vw, 2rem);
	line-height: 1.2;
}

/* ────────────────────────────────────────────────────────────────── Héro ─── */

.aod-landing__hero-media {
	margin: 0 0 1.5rem;
	border-radius: 14px;
	overflow: hidden;
}

.aod-landing__hero-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.aod-landing__hero-body {
	text-align: center;
}

.aod-landing__hero-title {
	margin: 0;
	font-size: clamp(1.8rem, 6vw, 3rem);
	line-height: 1.15;
}

.aod-landing__hero-text {
	margin-block: 0.85rem 0;
	margin-inline: auto;
	max-width: 46ch;
	font-size: clamp(1rem, 2.5vw, 1.15rem);
	opacity: 0.8;
}

.aod-landing__cta {
	margin-block-start: 1.5rem;
	/* Cible tactile confortable — le trafic DZ est mobile, au pouce. */
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ───────────────────────────────────────────────────────────── Bénéfices ─── */

.aod-landing__points {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aod-landing__point {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	padding: 1rem;
	border: 1px solid var(--aod-l-line);
	border-radius: 12px;
}

.aod-landing__point-icon,
.aod-landing__trust-icon {
	flex: 0 0 auto;
	font-size: 1.5rem;
	line-height: 1.2;
}

.aod-landing__point-body {
	min-width: 0; /* Sans ça, un mot long déborde de la carte. */
}

.aod-landing__point-title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.aod-landing__point-text {
	margin: 0.35rem 0 0;
	opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────────── Galerie ─── */

.aod-landing__gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aod-landing__gallery-item {
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
}

.aod-landing__gallery-img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1; /* Une grille régulière, quelles que soient les photos fournies. */
	object-fit: cover;
}

/* ───────────────────────────────────────────────────────────────── Vidéo ─── */

.aod-landing__video-wrap,
.aod-landing__video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: color-mix(in srgb, currentColor 8%, transparent);
}

.aod-landing__video-facade,
.aod-landing__video-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* La couverture est un BOUTON : au clavier comme au doigt, on « lit la vidéo ». */
.aod-landing__video-facade {
	position: relative;
	padding: 0;
	background: none;
	cursor: pointer;
}

.aod-landing__video-cover {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aod-landing__video-play {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	/* 64 px : cible tactile confortable, et repère visible sur n'importe quelle photo. */
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	/* Le contraste du ▶ ne dépend PAS de la couverture : le disque sombre le porte. */
	pointer-events: none;
}

/* En RTL, `translate(-50%)` déplacerait le disque du mauvais côté du centre. */
html[dir="rtl"] .aod-landing__video-play {
	transform: translate(50%, -50%);
}

.aod-landing__video-fallback {
	margin-block-start: 0.75rem;
	text-align: center;
}

/* Vidéo-FICHIER insérée dans la description produit (8.3). Un <video> natif prend
   sa taille intrinsèque et DÉBORDE à 390 px : on le borne. `preload="none"` (posé
   à l'insertion) garantit 0 octet téléchargé avant Lire — aucun JS ici. */
.aod-desc-video-file {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

/* ────────────────────────────────────────────────────────────────── Texte ─── */

.aod-landing__text {
	margin-inline: auto;
	max-width: 60ch; /* Au-delà, l'œil perd la ligne suivante. */
}

.aod-landing__text p {
	margin-block: 0 1rem;
}

.aod-landing__text p:last-child {
	margin-block-end: 0;
}

/* ────────────────────────────────────────────────────────────── Comparatif ─── */

.aod-landing__compare {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed; /* Deux colonnes égales — sinon la plus bavarde écrase l'autre. */
}

.aod-landing__compare th,
.aod-landing__compare td {
	padding: 0.75rem;
	text-align: start;
	vertical-align: top;
	border: 1px solid var(--aod-l-line);
	overflow-wrap: break-word; /* Un mot long ne doit pas élargir la page (écran blanc RTL). */
}

.aod-landing__compare th {
	font-size: 1rem;
}

/* La colonne « avec le produit » se distingue par un fond neutre, jamais par une
   couleur de marque : celle-ci appartient au thème du clone. */
.aod-landing__compare-win {
	background: color-mix(in srgb, currentColor 6%, transparent);
}

/* ─────────────────────────────────────────────────────────── Avis clients ─── */

.aod-landing__reviews {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aod-landing__review {
	padding: 1.25rem;
	border: 1px solid var(--aod-l-line);
	border-radius: 12px;
}

.aod-landing__review-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-block-end: 0.75rem;
}

.aod-landing__review-photo {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.aod-landing__review-name {
	margin: 0;
	font-weight: 600;
}

.aod-landing__review-stars {
	margin: 0;
	line-height: 1.2;
	letter-spacing: 0.1em;
	/* Les étoiles se lisent toujours de gauche à droite, même en arabe : ★★★☆☆ inversé
	   se lirait « 2 sur 5 » au lieu de « 3 sur 5 ». */
	direction: ltr;
	unicode-bidi: isolate;
}

.aod-landing__review-text {
	margin: 0;
	white-space: pre-line; /* Les sauts de ligne du gérant sont conservés. */
}

/* ───────────────────────────────────────────────────── Questions fréquentes ─── */

.aod-landing__faq {
	max-width: 60ch;
	margin-inline: auto;
}

.aod-landing__faq-item {
	border-block-end: 1px solid var(--aod-l-line);
}

.aod-landing__faq-item:first-child {
	border-block-start: 1px solid var(--aod-l-line);
}

.aod-landing__faq-q {
	padding: 1rem 0.25rem;
	cursor: pointer;
	font-weight: 600;
	/* Le triangle natif reste : c'est lui qui dit « ça s'ouvre ». On ne le remplace
	   pas par une icône maison qui devrait ensuite suivre le RTL à la main. */
}

.aod-landing__faq-a {
	padding: 0 0.25rem 1rem;
}

.aod-landing__faq-a p {
	margin: 0 0 0.75rem;
}

.aod-landing__faq-a p:last-child {
	margin-block-end: 0;
}

/* ─────────────────────────────────────────────────────────────── Urgence ─── */

.aod-landing__urgency {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0.875rem 1rem;
	border: 1px solid var(--aod-l-line);
	border-radius: 10px;
	background: color-mix(in srgb, currentColor 5%, transparent);
	font-weight: 600;
	text-align: center;
}

.aod-landing__countdown {
	display: flex;
	gap: 0.5rem;
	font-variant-numeric: tabular-nums; /* Les chiffres ne « sautent » pas à chaque seconde. */
}

.aod-landing__cd-unit {
	display: flex;
	align-items: baseline;
	gap: 0.15rem;
}

.aod-landing__cd-unit b {
	font-size: 1.15em;
}

.aod-landing__cd-unit i {
	font-style: normal;
	font-size: 0.8em;
	opacity: 0.75;
}

/* ────────────────────────────────────────────────────────── Barre collante ─── */

/* Elle vit HORS de `.aod-landing` (elle est fixée à l'écran, pas au flux) : elle ne
   peut donc pas hériter des variables du bloc — d'où les valeurs en dur ici. */
.aod-landing__sticky {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 100;
	padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
	background: Canvas;
	border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent);
	box-shadow: 0 -4px 16px rgb(0 0 0 / 10%);
	transition: transform 0.2s ease, visibility 0.2s;
}

/* Le formulaire est à l'écran : la barre s'efface. `visibility: hidden` — et pas un
   simple décalage — sort le lien de l'ordre de tabulation : une barre invisible qui
   garde le focus enverrait l'utilisateur au clavier sur un bouton qu'il ne voit pas. */
.aod-landing__sticky.is-off {
	transform: translateY(110%);
	visibility: hidden;
}

.aod-landing__sticky-cta {
	display: block;
	width: 100%;
	text-align: center;
}

/* La barre est FIXE : sans cette marge, elle recouvrirait la fin du contenu et le pied
   de page. C'est le `body` qu'on rallonge, pas la landing — le pied de page est dehors. */
body.aod-landing-sticky {
	padding-block-end: 4.5rem;
}

/* ─────────────────────────────────────────────────────────── Réassurance ─── */

.aod-landing__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.5rem;
	margin: 0;
	padding: 1.25rem;
	list-style: none;
	border-block: 1px solid var(--aod-l-line);
}

.aod-landing__trust-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────── Desktop ─── */

@media (min-width: 768px) {
	.aod-landing__points {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}

	.aod-landing__gallery {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	}

	.aod-landing__video-wrap,
	.aod-landing__video {
		margin-inline: auto;
		max-width: 900px;
	}

	.aod-landing__hero-media {
		max-height: 60vh;
	}

	.aod-landing__hero-img {
		max-height: 60vh;
	}

	.aod-landing__reviews {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}

	/* La barre collante est une réponse au POUCE : sur desktop, le bouton du héro et
	   celui du formulaire suffisent. On la retire — et la marge qu'elle imposait avec. */
	.aod-landing__sticky {
		display: none;
	}

	body.aod-landing-sticky {
		padding-block-end: 0;
	}
}

/* ---- Mouvement réduit (ROADMAP Phase 19, étape 19.1) --------------------- *
 * En fin de fichier : une surcharge placée avant ses cibles perd la cascade en
 * silence. Cf. le bloc jumeau de `aod-cod-form.css`.
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	/* La barre collante GLISSE depuis le bas. On retire le trajet, pas l'état :
	   `translateY(110%)` reste la position « effacée », appariée à
	   `visibility:hidden` qui la sort de l'ordre de tabulation. La barre
	   apparaît et disparaît donc instantanément, au bon endroit.
	   ⚠️ `visibility` GARDE sa transition : sans elle, l'élément redeviendrait
	   focusable avant d'être peint. */
	.aod-landing__sticky { transition: visibility 0.2s; }
}
