/* ==========================================================================
   Frisquéo — Thème WooCommerce
   Système de design : "le froid rendu visible"
   --------------------------------------------------------------------------
   1. Tokens (couleurs, typo, espacements, ombres, rayons)
   2. Reset & bases
   3. Typographie
   4. Layout & utilitaires
   5. Composants (boutons, badges, pills, cartes, marquee…)
   6. Header & barres
   7. Footer
   8. Sections page d'accueil
   9. Signature (courant d'air froid, ligne de givre)
   10. Animations & accessibilité
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root {
  /* Palette — froid (marque) vs chaud (urgence) */
  --navy:        #0F2C4C;
  --navy-800:    #16324f;
  --navy-700:    #1d3f61;
  --ink:         #0B1B2B;
  --ice:         #33BEE8;   /* accent marque, le froid */
  --ice-600:     #0E86B8;
  --ice-050:     #EAF6FB;   /* wash glacé */
  --frost:       #F3F9FC;   /* fond de section très pâle */
  --heat:        #F1663A;   /* promo / urgence / canicule */
  --heat-600:    #D8501F;
  --heat-050:    #FDEDE6;

  --white:       #FFFFFF;
  --paper:       #FBFDFE;
  --muted:       #64748B;
  --muted-400:   #94A3B8;
  --line:        #E7ECF0;
  --line-strong: #D6DFE6;

  /* Étoiles / notes */
  --star:        #F5A623;

  /* Typographie */
  --font-display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  /* Rôle "data/label" : on garde une variable dédiée mais sur la fonte de
     texte (chiffres tabulaires) — plus propre que l'ancien Space Mono. */
  --font-mono:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* Graisses de titres — volontairement plus fines/modernes */
  --w-display: 600;
  --w-display-strong: 700;

  /* Échelle typographique fluide */
  --step--1: clamp(0.80rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.18vw, 1.05rem);
  --step-1:  clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.90rem, 1.60rem + 1.5vw,  2.85rem);
  --step-4:  clamp(2.60rem, 1.90rem + 3.4vw,  4.75rem);
  --step-5:  clamp(3.40rem, 2.30rem + 5.5vw,  6.80rem);

  /* Espacements */
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.5rem;
  --space-7: 5rem;
  --space-8: 7rem;

  /* Rayons */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Ombres — douces, "givrées" */
  --sh-sm: 0 1px 2px rgba(15,44,76,.06), 0 1px 1px rgba(15,44,76,.04);
  --sh-md: 0 12px 30px -12px rgba(15,44,76,.18);
  --sh-lg: 0 30px 60px -20px rgba(15,44,76,.25);
  --sh-ice: 0 20px 45px -18px rgba(51,190,232,.45);

  --wrap: 1240px;
  --wrap-wide: 1440px;
  --header-h: 96px;
}

/* 2. RESET & BASES ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--ice); color: var(--white); }

/* 3. TYPOGRAPHIE =========================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: var(--w-display-strong); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice-600);
  font-weight: 700;
}
.eyebrow--light { color: rgba(255,255,255,.72); }

.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }
.mono { font-family: var(--font-mono); }

/* Rôle "data" : chiffres alignés (prix, compteurs, specs) */
.eyebrow, .badge, .spec-chip, .price, .countdown .n,
.product-card__cat, .fr-cat, .woocommerce ul.products li.product .price {
  font-variant-numeric: tabular-nums;
}

/* 4. LAYOUT & UTILITAIRES ================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.wrap--wide { max-width: var(--wrap-wide); }
.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-6); }
.section--frost { background: var(--frost); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.stack > * + * { margin-top: var(--space-3); }
.center { text-align: center; }
.hidden { display: none !important; }
.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;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.section-head { max-width: 640px; margin-inline: auto; text-align: center; margin-bottom: var(--space-6); }
.section-head .eyebrow { display: inline-block; margin-bottom: var(--space-2); }
.section-head p { margin-top: var(--space-3); color: var(--muted); font-size: var(--step-1); }

/* 5. COMPOSANTS ============================================================ */
/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--font-body); font-weight: 700; font-size: var(--step-0);
  padding: 0.95em 1.6em; border-radius: var(--r-pill);
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  line-height: 1; white-space: nowrap; border: 2px solid transparent;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--navy); color: var(--white); box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--sh-lg); }

.btn--ice { background: var(--ice); color: var(--navy); box-shadow: var(--sh-ice); }
.btn--ice:hover { background: #46c8ef; }

.btn--heat { background: var(--heat); color: var(--white); box-shadow: 0 16px 34px -14px rgba(241,102,58,.6); }
.btn--heat:hover { background: var(--heat-600); }

.btn--white { background: var(--white); color: var(--navy); box-shadow: var(--sh-md); }
.btn--white:hover { background: var(--frost); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy); background: var(--frost); }

.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 1.1em 2em; font-size: var(--step-1); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-mono); font-weight: 700; font-size: .72rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: .35em .7em; border-radius: var(--r-sm); line-height: 1;
}
.badge--heat { background: var(--heat); color: #fff; }
.badge--ice  { background: var(--ice-050); color: var(--ice-600); }
.badge--new  { background: var(--navy); color: #fff; }
.badge--soft { background: var(--frost); color: var(--muted); border: 1px solid var(--line); }

/* Puces de spec (langage technique) */
.spec-chip {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
  color: var(--navy); background: var(--ice-050);
  padding: .45em .8em; border-radius: var(--r-pill); line-height: 1;
}
.spec-chip svg { width: 14px; height: 14px; color: var(--ice-600); }

/* Étoiles */
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }
.rating-line { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--step--1); color: var(--muted); }

/* Cartes de réassurance */
.reassure-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.reassure {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s;
}
.reassure:hover { box-shadow: var(--sh-md); transform: translateY(-3px); border-color: var(--ice); }
.reassure .ic {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--ice-050); color: var(--ice-600);
}
.reassure .ic svg { width: 24px; height: 24px; }
.reassure h4 { font-size: 1.02rem; margin-bottom: 2px; }
.reassure p { font-size: var(--step--1); color: var(--muted); line-height: 1.45; }

/* Formulaires de recherche (thème + WooCommerce) --------------------------- */
.fr-search-form,
.woocommerce-product-search,
.search-form {
  display: flex; gap: .6rem; width: 100%;
}
.fr-search-form input[type="search"],
.woocommerce-product-search .search-field,
.search-form .search-field {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  padding: .85rem 1.3rem; font-size: .95rem; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.fr-search-form input[type="search"]:focus,
.woocommerce-product-search .search-field:focus,
.search-form .search-field:focus {
  border-color: var(--ice); box-shadow: 0 0 0 4px var(--ice-050); outline: none;
}
.fr-search-form button[type="submit"],
.woocommerce-product-search button[type="submit"],
.search-form .search-submit {
  background: var(--navy); color: #fff; border-radius: var(--r-pill);
  padding: 0 1.5rem; font-weight: 700; white-space: nowrap; transition: background .2s;
}
.fr-search-form button[type="submit"]:hover,
.woocommerce-product-search button[type="submit"]:hover,
.search-form .search-submit:hover { background: var(--navy-700); }

/* Contenu éditorial (WYSIWYG) --------------------------------------------- */
.entry-content { font-size: var(--step-0); color: var(--ink); line-height: 1.75; }
.entry-content > * + * { margin-top: var(--space-3); }
.entry-content h2 { font-size: var(--step-2); margin-top: var(--space-5); }
.entry-content h3 { font-size: var(--step-1); margin-top: var(--space-4); }
.entry-content p { color: #33475b; }
.entry-content a { color: var(--ice-600); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--navy); }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.entry-content ul { list-style: none; }
.entry-content ul li { position: relative; padding-left: 1.6rem; }
.entry-content ul li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); }
.entry-content ol { list-style: decimal; }
.entry-content blockquote { border-left: 3px solid var(--ice); padding: .5rem 0 .5rem 1.4rem; font-size: var(--step-1); color: var(--navy); font-style: italic; }
.entry-content img { border-radius: var(--r-md); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }

/* 9. SIGNATURE : ligne de givre (séparateur) ------------------------------ */
.frost-line {
  height: 2px; border: 0; background:
    repeating-linear-gradient(90deg, var(--ice) 0 10px, transparent 10px 22px);
  opacity: .5; margin-block: var(--space-6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

/* 10. ANIMATIONS =========================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

[data-reveal] { opacity: 0; }
.is-in [data-reveal], [data-reveal].is-in { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
[data-reveal][data-delay="1"] { animation-delay: .08s; }
[data-reveal][data-delay="2"] { animation-delay: .16s; }
[data-reveal][data-delay="3"] { animation-delay: .24s; }
[data-reveal][data-delay="4"] { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; }
}
