/* ==========================================================================
   Bubble Soft — feuille commune à toutes les pages publiques
   Style proche du site frère katz-ia.fr (Inter, arrondis, sections ardoise),
   avec les signatures Bubble Soft : papier millimétré et encadrés à ombre décalée.
   Palette : UNIQUEMENT le bleu, le violet et l'orange des 3 cubes + nuances
   (les gris « ardoise » sont des nuances bleutées).
   ========================================================================== */

/* ====== Tokens ====== */
:root {
    /* Bleu — couleur principale (cube bleu) */
    --bleu-50:  #F5F7FC;
    --bleu-100: #E7EDF9;
    --bleu-200: #C9D6F0;
    --bleu-300: #9FB5E3;
    --bleu-500: #527BCC;   /* rgb(82,123,204)  cube bleu */
    --bleu-600: #386ACD;   /* rgb(56,106,205)  bordure des cubes */
    --bleu-800: #141992;   /* ancienne navbar */
    --bleu-950: #0C0F4F;

    /* Violet — accent secondaire (cube violet) */
    --violet-100: #F2E8FC;
    --violet-300: #D1AEF1;
    --violet-500: #A45BE3; /* rgb(164,91,227) */
    --violet-700: #7433B0;

    /* Orange — Katz et appels à l'action (cube orange) */
    --orange-100: #FFF1E3;
    --orange-300: #FFCB9A;
    --orange-500: #FFA551; /* rgb(255,165,81) */
    --orange-800: #8A4300;

    /* Neutres ardoise (bleutés), comme katz-ia.fr */
    --ardoise: #1E293B;
    --ardoise-2: #334155;
    --fond: #F8FAFC;
    --fond-2: #F1F5F9;
    --texte: var(--ardoise);
    --texte-doux: #526077;
    --trait: #E2E8F0;
    --grille: rgba(82, 123, 204, 0.07);
    --grille-forte: rgba(82, 123, 204, 0.13);

    --ombre: 0 1px 3px rgba(30, 41, 59, 0.08), 0 1px 2px rgba(30, 41, 59, 0.04);
    --ombre-forte: 0 12px 32px rgba(30, 41, 59, 0.12);
    --lueur: 0 0 40px rgba(82, 123, 204, 0.18), 0 0 80px rgba(82, 123, 204, 0.08);
    --rayon: 16px;
    /* Encadrés : compromis entre l'ancien site (contour net, ombre décalée) et Katz (coins arrondis) */
    --cadre-rayon: 14px;

    --police: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', monospace;

    --gouttiere: clamp(16px, 4vw, 32px);
    --largeur: 1200px;
    --en-tete: 108px;
}

/* ====== Reset léger ====== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--en-tete) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--police);
    font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
    line-height: 1.65;
    color: var(--texte);
    background-color: var(--fond);
    /* Papier millimétré (signature Bubble Soft) : carreaux de 24px, trait marqué tous les 120px */
    background-image:
        linear-gradient(var(--grille-forte) 1px, transparent 1px),
        linear-gradient(90deg, var(--grille-forte) 1px, transparent 1px),
        linear-gradient(var(--grille) 1px, transparent 1px),
        linear-gradient(90deg, var(--grille) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    background-position: -1px -1px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
main { flex: 1; position: relative; z-index: 1; }

a { color: var(--bleu-600); text-underline-offset: 3px; }
a:hover { color: var(--bleu-800); }
:focus-visible { outline: 3px solid var(--bleu-300); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--bleu-500); color: #fff; }

/* ====== Typographie ====== */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--texte);
    text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); font-weight: 700; }
p { max-width: 68ch; text-wrap: pretty; }
.titre-section { max-width: 24ch; margin-bottom: clamp(32px, 5vw, 56px); }
/* Surlignage au feutre, comme les mots marqués de katz-ia.fr */
.surligne {
    background: linear-gradient(to top, rgba(255, 165, 81, 0.35) 35%, transparent 35%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.mono { font-size: 0.875rem; }

/* Étiquette en pastille au-dessus des titres (« Nos produits ») */
.annotation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(82, 123, 204, 0.1);
    color: var(--bleu-600);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.annotation::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Repère numéroté (figures, légendes) */
.repere {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: var(--bleu-100);
    color: var(--bleu-600);
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1;
}

.visuellement-cache {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.lien-evitement {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--ardoise);
    color: #fff;
}
.lien-evitement:focus { top: 12px; color: #fff; }

/* ====== Mise en page ====== */
.conteneur {
    width: min(100% - 2 * var(--gouttiere), var(--largeur));
    margin-inline: auto;
}
.section { padding-block: clamp(56px, 8vw, 104px); }

/* ====== Boutons : arrondis, lueur bleue sur l'action principale ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.06);
    color: var(--texte);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.btn:hover { color: var(--texte); background: rgba(30, 41, 59, 0.11); }
.btn--plein { background: var(--bleu-500); color: #fff; box-shadow: var(--lueur); }
.btn--plein:hover { background: var(--bleu-600); color: #fff; transform: translateY(-2px); box-shadow: var(--lueur), var(--ombre-forte); }
.btn--orange { background: var(--orange-500); color: var(--ardoise); }
.btn--orange:hover { background: #F5973D; color: var(--ardoise); transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.btn--petit { padding: 10px 18px; border-radius: 10px; font-size: 0.9375rem; }
.groupe-btn { display: flex; flex-wrap: wrap; gap: 12px 16px; }

/* ====== En-tête ====== */
.en-tete {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.85);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.06);
}
.en-tete__barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--en-tete);
}
.marque {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--texte);
}
.marque:hover { color: var(--texte); }
.marque__logo { width: auto; height: 64px; }
@media (min-width: 960px) { .marque__logo { height: 92px; } }
.marque__ref { display: none; font-size: 0.875rem; color: var(--texte-doux); padding-left: 12px; border-left: 1px solid var(--trait); }

.nav__bouton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.06);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}
.nav__icone, .nav__icone::before, .nav__icone::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s;
}
.nav__icone { position: relative; }
.nav__icone::before, .nav__icone::after { content: ""; position: absolute; left: 0; }
.nav__icone::before { top: -6px; }
.nav__icone::after { top: 6px; }
.menu-ouvert .nav__icone { background: transparent; }
.menu-ouvert .nav__icone::before { transform: translateY(6px) rotate(45deg); }
.menu-ouvert .nav__icone::after { transform: translateY(-6px) rotate(-45deg); }

.nav__liste {
    display: none;
    list-style: none;
    padding: 8px 0 20px;
    margin: 0;
}
.menu-ouvert .nav__liste { display: block; }
.nav__liste a:not(.btn) {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--trait);
    color: rgba(30, 41, 59, 0.75);
    font-weight: 500;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: color 0.15s;
}
.nav__liste a:not(.btn):hover,
.nav__liste a[aria-current="page"] { color: var(--bleu-600); }
.nav__liste li:last-child { padding-top: 18px; }

@media (min-width: 640px) {
    .marque__ref { display: inline; }
}
@media (min-width: 960px) {
    .nav__bouton { display: none; }
    .nav__liste {
        display: flex;
        align-items: center;
        gap: clamp(20px, 2.4vw, 32px);
        padding: 0;
    }
    .nav__liste a:not(.btn) { border: 0; padding: 6px 0; font-size: 0.975rem; }
    .nav__liste li:last-child { padding-top: 0; }
}
/* --- Sous-menu « Bubble Parts » (Présentation, Guide utilisateur) --- */
.nav__parent {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--trait);
    background: none;
    color: rgba(30, 41, 59, 0.75);
    font-weight: 500;
    font-size: 1.0625rem;
    text-align: left;
    cursor: pointer;
}
.nav__parent:hover,
.nav__groupe:has([aria-current="page"]) .nav__parent { color: var(--bleu-600); }
.nav__chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s;
}
.nav__sous-menu { list-style: none; padding: 0 0 0 16px; margin: 0; }
@media (max-width: 959.98px) {
    .nav__chevron { display: none; } /* sur mobile, les sous-liens restent toujours visibles */
    .nav__parent { cursor: default; }
}
@media (min-width: 960px) {
    .nav__groupe { position: relative; }
    .nav__parent { width: auto; padding: 6px 0; border: 0; font-size: 0.975rem; }
    .nav__sous-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: -18px;
        z-index: 60;
        display: none;
        min-width: 230px;
        padding: 8px;
        background: #fff;
        border: 2px solid var(--ardoise);
        border-radius: 12px;
        box-shadow: 5px 5px 0 var(--bleu-500);
    }
    /* pont invisible pour ne pas perdre le survol entre le bouton et le menu */
    .nav__sous-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
    .nav__groupe:hover .nav__sous-menu,
    .nav__groupe:focus-within .nav__sous-menu,
    .nav__groupe.ouvert .nav__sous-menu { display: block; }
    .nav__groupe:hover .nav__chevron,
    .nav__groupe.ouvert .nav__chevron { transform: translateY(1px) rotate(-135deg); }
    .nav__sous-menu a:not(.btn) { display: block; padding: 9px 12px; border-radius: 8px; }
    .nav__sous-menu a:not(.btn):hover,
    .nav__sous-menu a[aria-current="page"] { background: var(--bleu-100); color: var(--bleu-600); }
}

/* Menu mobile ouvert : la liste passe sous la barre */
@media (max-width: 959.98px) {
    .en-tete__barre { flex-wrap: wrap; }
    .nav { order: 3; flex-basis: 100%; }
    .menu-ouvert .nav { max-height: calc(100vh - var(--en-tete)); overflow-y: auto; }
    .nav__bouton { order: 2; }
}

/* ====== Carte produit ====== */
.fiche {
    --accent: var(--bleu-500);
    --accent-clair: var(--bleu-100);
    --accent-texte: var(--bleu-600);
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid var(--ardoise);
    border-radius: var(--cadre-rayon);
    box-shadow: 6px 6px 0 var(--accent);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.fiche:hover { box-shadow: 9px 9px 0 var(--accent); transform: translate(-2px, -2px); }
.fiche--orange { --accent: var(--orange-500); --accent-clair: var(--orange-100); --accent-texte: var(--orange-800); }
.fiche--violet { --accent: var(--violet-500); --accent-clair: var(--violet-100); --accent-texte: var(--violet-700); }
.fiche__entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: var(--accent-clair);
    color: var(--accent-texte);
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 2px solid var(--ardoise);
}
.fiche__entete .repere { background: #fff; color: var(--accent-texte); }
.fiche__corps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(22px, 3vw, 32px);
}
.fiche__accroche { font-size: 1.125rem; color: var(--texte-doux); }
.fiche__logo img { width: auto; height: clamp(52px, 7vw, 68px); }
.fiche__specs { display: grid; margin: 0; }
.fiche__specs > div {
    display: grid;
    grid-template-columns: minmax(96px, 30%) 1fr;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--trait);
}
.fiche__specs > div:last-child { border-bottom: 1px solid var(--trait); }
.fiche__specs dt { font-size: 0.875rem; font-weight: 500; color: var(--texte-doux); padding-top: 1px; }
.fiche__specs dd { margin: 0; font-weight: 500; }
@media (max-width: 479.98px) {
    .fiche__specs > div { grid-template-columns: 1fr; gap: 2px; }
    .fiche__entete { padding-inline: 18px; }
}
.fiche .groupe-btn { margin-top: auto; padding-top: 6px; }

/* ====== Pied de page sombre, comme katz-ia.fr ====== */
.pied {
    position: relative;
    z-index: 1;
    margin-top: clamp(48px, 7vw, 96px);
    padding: clamp(48px, 6vw, 64px) 0 32px;
    background: var(--ardoise);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9375rem;
}
.pied a { color: rgba(255, 255, 255, 0.62); text-decoration: none; transition: color 0.15s; }
.pied a:hover { color: var(--bleu-300); }
.cartouche { display: grid; gap: 32px; }
.cartouche dt, .cartouche .cartouche__titre {
    display: block;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}
.cartouche dd { margin: 0; }
.cartouche ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.cartouche__marque { display: flex; flex-direction: column; gap: 14px; }
.cartouche__marque p { font-size: 0.875rem; color: rgba(255, 255, 255, 0.6); }
.cartouche__marque img { width: 130px; flex: none; }
.cartouche__marque strong { color: #fff; font-size: 1.05rem; }
.pied__planche {
    max-width: none;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
}
@media (min-width: 720px) {
    .cartouche { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; }
    .cartouche__marque { grid-row: auto; }
}
