/* D'BakerAid — designs au choix, carrousel et mise en page « Épuré » */

/* ================= DESIGNS (choisis dans le back-office) ================= */
/* Épuré : blanc, vert, grandes images (inspiré Vorwerk) */
.theme-epure {
  --cream: #FFFFFF; --sand: #F3F4F3; --line: #E4E6E5; --line-strong: #CDD1CF;
  --ink: #23282D; --muted: #5B6166; --soft: #9AA0A4; --accent: #00A650; --accent-dark: #00843F;
  --white: #FFFFFF; --dark: #23282D; --on-dark: #FFFFFF; --heading: var(--sans);
  --radius: 10px; --radius-lg: 14px; --btn-radius: 8px;
}
.theme-epure h1, .theme-epure h2 { font-weight: 800; letter-spacing: -.02em; }
.theme-epure .kicker { letter-spacing: .08em; }
.theme-epure .section-white { background: var(--sand); }

/* Élégant : noir et or */
.theme-elegant {
  --cream: #0F0E0C; --sand: #1B1916; --line: #2C2823; --line-strong: #40392F;
  --ink: #F4EEE3; --muted: #B7AC9C; --soft: #8A8074; --accent: #C9A25E; --accent-dark: #A9843F;
  --white: #181613; --dark: #070605; --on-dark: #F4EEE3; --heading: var(--serif); --btn-radius: 2px;
}
.theme-elegant .btn-accent, .theme-elegant .btn-accent:hover, .theme-elegant .preorder-bar,
.theme-elegant .preorder-bar a, .theme-elegant .pill-accent { color: #0F0E0C; }
.theme-elegant .messages .success, .theme-elegant .messages .error { color: #111; }

/* Charte D'BakerAid : chocolat #522319, crème #F8EFDB, jaune blé #FFE4AB, bleu ciel #CCE4F5.
   Titres manuscrits (Little Moment -> Schoolbell), texte en Futura (-> Jost). */
.theme-charte, .theme-charte-ble, .theme-charte-ciel, .theme-charte-choco {
  --cream: #F8EFDB; --sand: #FFE4AB; --white: #FFFBF2; --sky: #CCE4F5;
  --line: color-mix(in srgb, #522319 14%, transparent); --line-strong: color-mix(in srgb, #522319 28%, transparent);
  --ink: #522319; --muted: #7A4E42; --soft: #B39A8C; --accent: #522319; --accent-dark: #3A1810;
  --dark: #522319; --on-dark: #F8EFDB;
  --sans: var(--futura); --serif: var(--futura); --heading: var(--hand);
  --radius: 18px; --radius-lg: 28px; --btn-radius: 999px;
}
.theme-charte-ble { --cream: #FFE4AB; --sand: #F8EFDB; }
.theme-charte-ciel { --cream: #CCE4F5; --sand: #F8EFDB; --white: #FFFFFF; }
.theme-charte-choco {
  --cream: #522319; --sand: #63302A; --white: #5E2B20; --ink: #F8EFDB; --muted: #E8D3BC; --soft: #C9A991;
  --line: rgba(248,239,219,.16); --line-strong: rgba(248,239,219,.3);
  --accent: #FFE4AB; --accent-dark: #F8EFDB; --dark: #3A1810; --on-dark: #F8EFDB;
}
/* Titres manuscrits : la police n'a qu'une graisse, pas de faux gras */
[class*="theme-charte"] :is(h1, h2, h3, .m-marquee), .font-hand :is(h1, h2, h3, .m-marquee) { font-weight: 400; letter-spacing: .01em; }
[class*="theme-charte"] .btn-accent { color: var(--on-dark); }
[class*="theme-charte"] .footer a:hover { color: #FFE4AB; }
.theme-charte-choco .btn-accent, .theme-charte-choco .btn-accent:hover, .theme-charte-choco .preorder-bar,
.theme-charte-choco .preorder-bar a, .theme-charte-choco .pill-accent { color: #522319; }
.theme-charte-choco .messages .success, .theme-charte-choco .messages .error { color: #111; }
.theme-charte-choco .slide-fallback { background: radial-gradient(120% 90% at 75% 50%, #7A3A2C 0%, #3A1810 70%); }

/* Logo officiel (dessin de la charte) : prend la couleur du texte autour */
.brand-logo { display: block; height: 40px; aspect-ratio: 825 / 139; background: currentColor;
  -webkit-mask: url("../img/charte/logo-horizontal.svg") center / contain no-repeat;
  mask: url("../img/charte/logo-horizontal.svg") center / contain no-repeat; }
.footer .brand-logo { height: 46px; }
@media (max-width: 700px) { .brand-logo { height: 30px; } }

/* Frise de pictos de la charte, au-dessus du pied de page.
   Réglage back-office : « Avec les designs Charte » / « Sur tous les designs » / « Jamais » */
.picto-frieze { display: none; }
.pictos-always .picto-frieze, [class*="theme-charte"].pictos-charte .picto-frieze { display: flex; }
.picto[hidden] { display: none; }
.picto-frieze { justify-content: center; flex-wrap: wrap; gap: clamp(18px, 4vw, 48px); padding: 34px 16px; color: var(--ink); opacity: .9; }
.picto { display: block; width: clamp(44px, 6vw, 64px); aspect-ratio: 1; background: currentColor;
  -webkit-mask: var(--p) center / contain no-repeat; mask: var(--p) center / contain no-repeat; transition: transform .3s; }
.picto:hover { transform: rotate(-8deg) scale(1.08); }

/* Police des titres choisie à la main */
/* Polices fixes : le choix marche pareil sur tous les designs */
.font-serif { --heading: var(--fraunces); }
.font-sans { --heading: var(--manrope); }
.font-hand { --heading: var(--hand); }
.font-futura { --heading: var(--futura); }
/* Police du texte choisie à la main (texte courant, boutons, champs) */
.text-sans { --sans: var(--manrope); }
.text-futura { --sans: var(--futura); }
.text-serif { --sans: var(--fraunces); }
/* Texte de la charte en Futura Light (Jost fin) : par défaut avec les designs Charte */
[class*="theme-charte"], .text-futura-light { --body-weight: 300; }
.text-futura-light { --sans: var(--futura); }
.text-sans, .text-futura, .text-serif { --body-weight: 400; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.logo-img { max-height: 42px; width: auto; display: block; }
.footer .logo-img { max-height: 48px; }

/* ================= CARROUSEL ================= */
.carousel { position: relative; overflow: hidden; background: var(--dark); color: #fff; }
/* --car-offset (js/carousel.js) = en-tête + bandeaux au-dessus + bandeau juste en dessous :
   le bandeau sous le carrousel reste toujours visible au premier écran.
   Plancher de 150px : en dessous, le titre et les boutons ne tiendraient plus. */
.carousel { --car-room: max(150px, calc(100svh - var(--car-offset, 120px))); }
.carousel.h-full { height: var(--car-room); }
.carousel.h-large { height: min(72svh, var(--car-room)); min-height: min(500px, var(--car-room)); }
.carousel.h-medium { height: min(52svh, var(--car-room)); min-height: min(420px, var(--car-room)); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide-media, .slide-media img, .slide-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.slide-media iframe { position: absolute; border: 0; width: 177.78vh; height: 56.25vw; min-width: 100%; min-height: 100%; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.slide.is-active .slide-media img { animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.slide-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 8vw;
  background: radial-gradient(120% 90% at 75% 50%, color-mix(in srgb, var(--accent) 55%, var(--dark)) 0%, var(--dark) 70%); }
.slide-overlay { position: absolute; inset: 0; }
.slide-overlay.side-left { background: linear-gradient(90deg, rgba(0,0,0,var(--o)) 0%, rgba(0,0,0,calc(var(--o) * .35)) 60%, transparent 100%); }
.slide-overlay.side-right { background: linear-gradient(270deg, rgba(0,0,0,var(--o)) 0%, rgba(0,0,0,calc(var(--o) * .35)) 60%, transparent 100%); }
.slide-overlay.side-center { background: rgba(0,0,0,var(--o)); }
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 20px; padding-bottom: 90px; }
.slide-content .inner { max-width: 620px; }
.slide.pos-center .slide-content { align-items: center; text-align: center; }
.slide.pos-center .inner { max-width: 820px; }
.slide.pos-right .slide-content { align-items: flex-end; }
.slide.text-dark { color: #1C1611; }
.slide .kicker { color: inherit; opacity: .9; }
.slide h2 { font-size: clamp(34px, 5.6vw, 72px); line-height: 1.02; margin: 6px 0 14px; color: inherit; }
.slide p.sub { font-size: clamp(16px, 1.6vw, 20px); max-width: 560px; opacity: .92; margin: 0 0 24px; }
.slide.pos-center p.sub { margin-left: auto; margin-right: auto; }
.slide.pos-center .cta-row { justify-content: center; }
.slide.is-active .inner > * { animation: vUp .9s cubic-bezier(.2,.7,.2,1) both; }
.slide.is-active .inner > *:nth-child(2) { animation-delay: .12s; }
.slide.is-active .inner > *:nth-child(3) { animation-delay: .24s; }
.slide.is-active .inner > *:nth-child(4) { animation-delay: .36s; }
.btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.8); color: #fff; backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; color: #1C1611; border-color: #fff; }
.slide.text-dark .btn-ghost { color: #1C1611; border-color: #1C1611; background: rgba(255,255,255,.5); }
.car-ui { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 5; }
.car-ui .container { display: flex; align-items: center; gap: 14px; }
.car-bars { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.car-bar { flex: 1; height: 26px; background: none; border: 0; padding: 11px 0; cursor: pointer; }
.car-bar span { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.car-bar span i { display: block; height: 100%; width: 0; background: #fff; }
.car-bar.done span i { width: 100%; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); background: rgba(0,0,0,.25); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); flex-shrink: 0; }
.car-btn:hover { background: #fff; color: #1C1611; }
.car-btn[hidden] { display: none; }
.car-count { font-weight: 800; font-size: 13px; letter-spacing: .06em; min-width: 46px; color: #fff; }
.car-arrows { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 700px) {
  .car-arrows .car-btn.arrow { display: none; }
  .slide-content { justify-content: flex-end; padding-bottom: 96px; }
  .slide-overlay.side-left, .slide-overlay.side-right { background: linear-gradient(0deg, rgba(0,0,0,var(--o)) 0%, rgba(0,0,0,calc(var(--o) * .4)) 55%, transparent 100%); }
  .slide.pos-right .slide-content { align-items: flex-start; }
  .slide-fallback { justify-content: center; align-items: flex-start; padding: 36px 0 0; }
  .slide-fallback svg { width: 170px; }
}
/* Écran très bas (téléphone à l'horizontale) : texte compact pour garder le bandeau visible */
@media (max-height: 520px) {
  .slide-content { padding-top: 10px; padding-bottom: 62px; }
  .slide h2 { font-size: clamp(22px, 4vw, 32px); margin: 2px 0 6px; }
  .slide p.sub { font-size: 14px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .slide .btn-lg { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .car-ui { bottom: 8px; }
}
@media (max-height: 440px) {
  .slide .kicker, .slide p.sub { display: none; }
}

/* ================= ACCUEIL « ÉPURÉ » (style Vorwerk) ================= */
.tiles-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand); min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; color: var(--ink); text-decoration: none; }
.tile:hover { color: var(--ink); }
.tile .tile-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 90px; }
.tile .tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile:hover .tile-media img { transform: scale(1.05); }
.tile .tile-body { position: relative; background: var(--white); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.08); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tile h3 { margin: 0; font-size: 18px; }
.value-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.value-grid .v-icon { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px; }
.value-grid .v-icon .icon { width: 26px; height: 26px; }
.value-grid h3 { font-size: 18px; margin-bottom: 6px; }
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.reverse > :first-child { order: 2; } }
.split-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--sand); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; position: relative; }
.split-media img, .split-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.icon-list { display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; margin: 20px 0 0; }
.icon-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.icon-list li::before { content: ""; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--accent) var(--i-check-white) center / 14px no-repeat; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.buy-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: grid; gap: 28px; }
@media (min-width: 900px) { .buy-card { grid-template-columns: 1fr 1fr; align-items: center; padding: 44px; } }
.trust { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: center; }
.trust div { padding: 26px 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); font-weight: 700; }
.trust span { display: block; font-size: 30px; margin-bottom: 8px; color: var(--accent); }
.trust span .icon { width: 30px; height: 30px; }
.offers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.offer { border-radius: var(--radius-lg); padding: 32px; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; background: var(--sand); position: relative; overflow: hidden; }
.offer.dark { background: var(--dark); color: var(--on-dark); }
.offer.accent { background: var(--accent); color: #fff; }
.offer.accent .btn { background: #fff; color: var(--ink); border-color: #fff; }
.offer p { max-width: 420px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.offer .pill { color: var(--ink); background: #fff; }

/* Mobile : la barre d'achat n'apparaît qu'après le carrousel, WhatsApp en simple icône */
.sticky-buy.wait-scroll { transform: translateY(160%); transition: transform .35s ease; }
.sticky-buy.wait-scroll.show { transform: none; }
/* Barre d'achat mobile affichée : WhatsApp remonte juste au-dessus pour ne pas la cacher */
@media (max-width: 899px) {
  /* Avec carrousel, la barre n'arrive qu'après le défilement (.show, js/site.js) */
  body:has(.sticky-buy):not(:has(.carousel)) .whatsapp, body:has(.sticky-buy.show) .whatsapp { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) {
  .whatsapp { width: 46px; height: 46px; padding: 0; border-radius: 50%; right: calc(10px + env(safe-area-inset-right)); }
  .whatsapp .wa-text { display: none; }
  .carousel.h-full, .carousel.h-large { height: var(--car-room); min-height: 0; }
}
