/* ============= RESET & BASE ============= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #001a33;
    --bg-soft: #002347;
    --surface: #ffffff;
    --surface-soft: #f6f8fc;
    --border: #e5e9f2;
    --text: #0e1628;
    --text-soft: #4a5568;
    --text-muted: #6b7280;
    --primary: #003462;
    --primary-dark: #002347;
    --accent: #F19B37;
    --accent-2: #1c4a82;
    --gradient: linear-gradient(135deg, #003462 0%, #F19B37 100%);
    --gradient-text: linear-gradient(135deg, #003462 0%, #1c4a82 60%, #F19B37 100%);
    --shadow-sm: 0 2px 8px rgba(15, 23, 48, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 23, 48, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 48, 0.12);
    --radius: 14px;
    --radius-lg: 22px;
    --container: 1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Navigation clavier : contour visible uniquement au focus clavier */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============= NAV ============= */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 2px 24px rgba(15, 23, 48, 0.04);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.logo-img-light {
    height: 44px;
    width: auto;
    display: block;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-soft);
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

.nav-links a.is-current {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.nav-cta {
    background: var(--text);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-cta:hover { background: var(--primary); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.25s;
}
/* Menu ouvert : le burger devient une croix */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============= BUTTONS ============= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--text);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 52, 98, 0.18);
}
.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 52, 98, 0.32);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--text);
    background: var(--surface-soft);
}

.btn-block { width: 100%; }

.btn:disabled,
.btn:disabled:hover {
    opacity: 0.65;
    cursor: progress;
    transform: none;
}

/* ============= HERO ============= */
.hero {
    position: relative;
    padding: 160px 0 120px;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.hero-bg::before, .hero-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}
.hero-bg::before {
    top: -120px; right: -100px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, #F19B37 0%, transparent 70%);
}
.hero-bg::after {
    bottom: -150px; left: -120px;
    width: 540px; height: 540px;
    background: radial-gradient(circle, #1c4a82 0%, transparent 70%);
    opacity: 0.35;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 920px;
}

.badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0, 52, 98, 0.08);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.hero h1 {
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--text-soft);
    max-width: 720px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}
/* Sans bloc de stats en dessous, la marge déséquilibrait le hero */
.hero-cta:last-child { margin-bottom: 0; }
/* Le titre d'accueil tient en deux phrases, une par ligne quand la largeur le permet */
.hero-content { max-width: 1080px; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
.hero-line { display: block; }
.hero-tagline {
    margin: -16px auto 36px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
}

/* En-tête des pages intérieures : même fond que l'accueil, en plus compact */
.page-hero {
    position: relative;
    padding: 150px 0 64px;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
}
.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    text-align: center;
}
.page-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); margin-bottom: 18px; }
.page-lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--text-soft); }

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============= SECTIONS ============= */
section {
    padding: 110px 0;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 64px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 14px;
}

.eyebrow-light { color: var(--accent); }

.section-head h2 { margin-bottom: 16px; }

.section-head p {
    color: var(--text-soft);
    font-size: 1.05rem;
}

/* ============= CAS D'USAGE INTERACTIF ============= */
/* Dans la continuité de l'en-tête de page : même fond, pas de marge haute en double */
.usecase { background: var(--surface-soft); padding-top: 0; }

/* Sélecteur : une carte par cas, celle du cas affiché prend les couleurs du jeu */
.cas-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.cas-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
    color: var(--text);
    transition: all 0.25s ease;
}
.cas-card-icon {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 52, 98, 0.08), rgba(241, 155, 55, 0.12));
    color: var(--primary);
}
.cas-card-icon svg { width: 22px; height: 22px; }
.cas-card strong {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.25;
}
.cas-card-text { font-size: 0.86rem; color: var(--text-soft); }
.cas-card-apps { font-size: 0.78rem; color: var(--text-muted); }
/* Faux bouton : c'est toute la carte qui se clique */
.cas-card-go {
    margin-top: auto;
    padding: 7px 18px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.cas-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.cas-card:hover .cas-card-go { border-color: var(--text); }
.cas-card[aria-pressed="true"] {
    background: linear-gradient(135deg, #001a33 0%, #003462 100%);
    border-color: transparent;
    box-shadow: var(--shadow-md);
    color: #fff;
}
.cas-card[aria-pressed="true"] .cas-card-icon { background: rgba(255, 255, 255, 0.12); color: var(--accent); }
.cas-card[aria-pressed="true"] .cas-card-text { color: rgba(255, 255, 255, 0.78); }
.cas-card[aria-pressed="true"] .cas-card-apps { color: rgba(255, 255, 255, 0.55); }
.cas-card[aria-pressed="true"] .cas-card-go { background: var(--accent); border-color: var(--accent); color: #001a33; }

.game {
    --game-line: rgba(255, 255, 255, 0.12);
    --game-soft: rgba(255, 255, 255, 0.78);
    --game-muted: rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, #001a33 0%, #003462 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: #fff;
    overflow: hidden;
    scroll-margin-top: 88px;    /* sous la barre de navigation fixe */
}
.game [hidden] { display: none; }

.game-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--game-line);
}
.game-mission {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.game-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}
.game-steps [data-goto] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--game-line);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--game-soft);
    transition: all 0.2s;
}
.game-steps b {
    display: grid;
    place-items: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
}
.game-steps .is-locked { opacity: 0.4; cursor: default; }
.game-steps .is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: #001a33;
}
.game-steps .is-current b { background: rgba(0, 26, 51, 0.16); }
.game-steps button:not(.is-locked):not(.is-current):hover { border-color: var(--accent); color: #fff; }

/* Hauteur fixe : passer d'un niveau à l'autre ne doit pas faire sauter la page */
.game-main {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 540px;
}

/* Scène : la partie visuelle de chaque jeu */
.game-stage {
    position: relative;
    background:
        radial-gradient(circle at 50% 45%, rgba(28, 74, 130, 0.55) 0%, rgba(7, 31, 58, 0) 70%),
        #071f3a;
    border-right: 1px solid var(--game-line);
    overflow: hidden;
}
.game-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    cursor: grab;
    touch-action: pan-y;
}
.game-canvas:active { cursor: grabbing; }
/* Relance : tableau des commandes au niveau 1, matrice au niveau 4, nuage 3D ailleurs */
#cas-relance[data-phase="1"] .game-canvas,
#cas-relance[data-phase="1"] .game-hint,
#cas-relance[data-phase="1"] .game-legend,
#cas-relance[data-phase="4"] .game-canvas,
#cas-relance[data-phase="4"] .game-hint,
#cas-relance:not([data-phase="1"]) .game-orders,
#cas-relance:not([data-phase="4"]) .game-matrix { display: none; }

/* Niveau 4 : matrice de similarité entre produits */
.game-matrix { position: absolute; inset: 0; }
.game-matrix svg { display: block; }
.game-matrix-label { font-size: 11px; fill: rgba(255, 255, 255, 0.6); }
.game-matrix-label.is-on { fill: #fff; font-weight: 600; }
.game-matrix-cell { fill: var(--accent); cursor: pointer; transition: opacity 0.2s; }
.game-matrix-cell.is-self { fill: rgba(255, 255, 255, 0.08); cursor: default; }
.game-matrix-cell.is-dim { opacity: 0.7; }
.game-matrix-cell:not(.is-self):hover { stroke: #fff; stroke-width: 1.5; }

.game-hint {
    position: absolute;
    top: 14px; right: 16px;
    font-size: 0.75rem;
    color: var(--game-muted);
    pointer-events: none;
}
.game-legend {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 28px 16px 14px;
    /* voile sous la légende : elle reste lisible quand des points passent derrière */
    background: linear-gradient(rgba(7, 31, 58, 0), rgba(7, 31, 58, 0.9) 45%);
    font-size: 0.8rem;
    color: var(--game-soft);
    pointer-events: none;
}
.game-legend:empty { display: none; }
.game-legend span { display: inline-flex; align-items: center; gap: 6px; }
.game-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 10px; height: 10px;
    border-radius: 50%;
}
.game-dot.is-ring { border: 1.5px solid #fff; }
/* Point blanc cerclé : même dessin que les arrêts à heure limite sur la carte */
.game-dot.is-target { width: 8px; height: 8px; margin: 0 3px; background: #fff; box-shadow: 0 0 0 2px #071f3a, 0 0 0 3.5px #fff; }
.game-key {
    display: inline-block;
    flex-shrink: 0;
    width: 16px; height: 3px;
    border-radius: 2px;
}

.game-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.game-orders {
    position: absolute;
    top: 0; left: 0;
}
/* Le bas du tableau s'efface : l'historique continue bien au-delà */
#cas-relance[data-phase="1"] .game-stage::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 45%;
    background: linear-gradient(rgba(7, 31, 58, 0), #071f3a);
    pointer-events: none;
}
.game-table th {
    padding: 16px 20px 10px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--game-muted);
}
.game-table td {
    padding: 7px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--game-soft);
}
.game-table th:last-child,
.game-table td:last-child { text-align: right; }

.game-tip {
    position: absolute;
    z-index: 2;
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    font-size: 0.8rem;
    color: var(--text-soft);
    white-space: nowrap;
    pointer-events: none;
}
.game-tip strong { color: var(--text); }

/* Panneau d'explication, un par niveau */
.game-side { padding: 32px 32px 12px; }
.game-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}
.game-panel h3 {
    margin-bottom: 12px;
    font-size: 1.45rem;
    color: #fff;
}
.game-panel p { font-size: 0.97rem; color: var(--game-soft); }
.game-panel p strong { color: #fff; }
.game-panel .game-sub {
    margin: 22px 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--game-muted);
}
.game-panel .game-fine {
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--game-muted);
}

.game-segs { display: flex; flex-wrap: wrap; gap: 8px; }
.game-segs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--game-line);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s;
}
.game-segs small { font-size: 0.8rem; font-weight: 400; color: var(--game-muted); }
.game-segs button:hover { border-color: rgba(255, 255, 255, 0.45); }
.game-segs button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.game-products { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.game-products button {
    padding: 5px 12px;
    border: 1px solid var(--game-line);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--game-soft);
    transition: all 0.2s;
}
.game-products button:hover { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.game-products button[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    color: #001a33;
}
.game-similar li { grid-template-columns: 92px 1fr 40px; }

.game-radar svg {
    display: block;
    width: 100%;
    max-width: 330px;
    margin: 10px auto 4px;
}
.game-radar-ring { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.game-radar-ring.is-median { stroke: rgba(255, 255, 255, 0.45); }
.game-radar-label { font-size: 11px; fill: rgba(255, 255, 255, 0.78); }
.game-radar-seg polygon {
    fill: var(--seg);
    fill-opacity: 0.1;
    stroke: var(--seg);
    stroke-width: 2;
    stroke-linejoin: round;
}
.game-radar-seg.is-on polygon { fill-opacity: 0.3; }
.game-radar-seg.is-off polygon { fill: none; stroke-width: 1; stroke-opacity: 0.35; }
.game-radar-seg circle { fill: var(--seg); stroke: #0a2746; stroke-width: 2; }
.game-panel .game-seg-stats { font-size: 0.86rem; color: #fff; }
.game-panel .game-seg-desc { margin-top: 4px; font-size: 0.86rem; min-height: 3.2em; }

.game-bars { list-style: none; display: grid; gap: 14px; }
.game-bars li {
    display: grid;
    grid-template-columns: 118px 1fr 44px;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--game-soft);
}
.game-bars li > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.game-bar-track { height: 12px; border-left: 1px solid rgba(255, 255, 255, 0.3); }
.game-bar { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; }
.game-bars b { text-align: right; color: #fff; font-variant-numeric: tabular-nums; }

.game-slider { display: grid; gap: 12px; color: var(--game-soft); }
.game-slider strong { font-size: 1.25rem; color: #fff; }
.game-slider input { width: 100%; accent-color: var(--accent); cursor: pointer; }

.game-panel .game-mail-lead { margin-top: 18px; }
/* Aperçu de l'e-mail envoyé automatiquement */
.game-mail {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--game-line);
    border-radius: var(--radius);
}
.game-panel .game-mail-to {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--game-muted);
}
.game-panel .game-mail-subject {
    margin: 6px 0 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.game-panel .game-mail-body { font-size: 0.86rem; }
.game-mail-next { margin-top: 10px; }

/* Bouton secondaire, commun à tous les jeux */
.game-btn {
    padding: 6px 14px;
    border: 1px solid var(--game-line);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s;
}
.game-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.game-btn:disabled { opacity: 0.4; cursor: default; }
.game-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Repère d'état : l'icône porte la couleur, le texte reste blanc */
.game-status { font-style: normal; font-weight: 700; }
.game-status.is-good { color: #2fc42f; }
.game-status.is-bad { color: #ff7b7b; }
.game-status.is-warn { color: #fab219; }

.game-score { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-score > div {
    padding: 14px 16px;
    border: 1px solid var(--game-line);
    border-radius: var(--radius);
}
.game-score > div:first-child { border-color: var(--accent); background: rgba(241, 155, 55, 0.08); }
.game-score.is-plain > div:first-child { border-color: var(--game-line); background: none; }
.game-panel .game-score { margin-top: 18px; }
.game-panel h3 + .game-score { margin-top: 0; }
.game-score .game-score-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--game-muted);
}
.game-score .game-score-value { font-size: 0.95rem; color: #fff; }
.game-score-value span { font-size: 1.9rem; font-weight: 600; }
.game-score .game-score-detail { font-size: 0.8rem; color: var(--game-muted); }
.game-panel .game-verdict { margin-top: 18px; min-height: 4.8em; color: #fff; }
.game-panel .game-verdict strong { font-size: 1.3rem; color: var(--accent); }

.game-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px 24px;
    padding: 18px 28px 24px;
    border-top: 1px solid var(--game-line);
}
.game-next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    color: #001a33;
    transition: background 0.2s, transform 0.2s;
    animation: game-pulse 2.2s infinite;
}
.game-next::before { content: '▶'; font-size: 0.72em; }
.game-next:hover { background: #fff; transform: translateY(-2px); }
.game-next:disabled {
    opacity: 0.5;
    cursor: progress;
    transform: none;
    animation: none;
}
/* Halo qui bat doucement : le bouton à presser pour avancer */
@keyframes game-pulse {
    0% { box-shadow: 0 0 0 0 rgba(241, 155, 55, 0.45); }
    70%, 100% { box-shadow: 0 0 0 14px rgba(241, 155, 55, 0); }
}
.game-contact {
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.game-contact:hover { color: var(--accent); }

/* Graphiques des jeux : grille et axes en retrait, texte en blanc atténué */
.game-chart-title { font-size: 12px; font-weight: 600; fill: rgba(255, 255, 255, 0.78); }
.game-chart-grid { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; }
.game-chart-axis { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; }
.game-chart-tick { font-size: 11px; fill: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.game-chart-overlay { fill: transparent; touch-action: pan-y; }

/* ----- Cas « Piloter les marges » : un tableau de bord dans le cadre des jeux ----- */
#cas-marges {
    --mg-card: rgba(255, 255, 255, 0.05);
    --mg-soft: rgba(255, 255, 255, 0.05);
    --mg-ink: #fff;
    --mg-muted: rgba(255, 255, 255, 0.62);
    --mg-line: rgba(255, 255, 255, 0.12);
    --mg-grey: rgba(255, 255, 255, 0.3);
    --mg-pos: #2fc42f;
    --mg-pos-soft: rgba(47, 196, 47, 0.16);
    --mg-neg: #ff7b7b;
    --mg-neg-soft: rgba(255, 123, 123, 0.16);
    --mg-warn-soft: rgba(250, 178, 25, 0.18);
    /* Quatre produits : teintes vérifiées deux à deux pour le daltonisme, dans cet ordre d'empilement */
    --mg-c0: #3987e5;
    --mg-c1: #d95926;
    --mg-c2: #199e70;
    --mg-c3: #c98500;
}
.mg-body {
    padding: 24px 24px 28px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--mg-ink);
}
.mg-body table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mg-body svg { display: block; }
.mg-body svg text { fill: var(--mg-muted); font: 11px Inter, sans-serif; }
.mg-body svg .mg-strong { fill: var(--mg-ink); font-weight: 700; font-size: 12px; }
.mg-body h3 { font-size: 1.35rem; color: #fff; }
.mg-body h4 { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; color: #fff; }
.mg-sub { font-size: 12px; color: var(--mg-muted); }

.mg-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.mg-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mg-period {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: var(--mg-card);
    border: 1px solid var(--mg-line);
    border-radius: 10px;
}
.mg-period button {
    width: 30px; height: 30px;
    border-radius: 7px;
    font-size: 16px;
    color: #fff;
}
.mg-period button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.mg-period button:disabled { opacity: 0.3; cursor: default; }
.mg-period span { min-width: 140px; text-align: center; font-size: 13px; font-weight: 600; }
.mg-period small { display: block; font-size: 11px; font-weight: 400; color: var(--mg-muted); }
.mg-scen {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--mg-warn-soft);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}
.mg-scen.on { display: flex; }
.mg-scen button {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    font-size: 11px;
    color: #fff;
}
/* Pastille de la 3e vue : nombre de hausses d'achat à traiter */
.mg-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    background: #d03b3b;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    color: #fff;
}

.mg-grid { display: grid; gap: 14px; }
.mg-kpis { grid-template-columns: repeat(4, 1fr); }
.mg-c21 { grid-template-columns: 2fr 1fr; }
.mg-gap { margin-top: 14px; }
.mg-card {
    min-width: 0;
    padding: 16px 18px;
    background: var(--mg-card);
    border: 1px solid var(--mg-line);
    border-radius: 12px;
}
.mg-hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.mg-chart { overflow-x: auto; }

/* Tuiles d'indicateurs : un clic change l'indicateur du graphique */
.mg-kpi {
    display: block;
    text-align: left;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.mg-kpi:hover { border-color: rgba(255, 255, 255, 0.45); }
.mg-kpi.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.mg-k-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mg-muted);
}
.mg-k-val { display: block; margin: 4px 0; font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mg-k-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.mg-kpi .mg-sub { font-size: 11px; white-space: nowrap; }
.mg-k-row > span:first-child { min-width: 0; }
.mg-spark { stroke: rgba(255, 255, 255, 0.85); }
.mg-spark-dot { fill: #fff; }

/* Étiquettes de variation : la couleur dit bonne ou mauvaise nouvelle, le texte dit combien */
.mg-delta {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.mg-delta.up { background: var(--mg-pos-soft); color: var(--mg-pos); }
.mg-delta.down { background: var(--mg-neg-soft); color: var(--mg-neg); }
.mg-delta.flat { background: var(--mg-line); color: var(--mg-muted); }

.mg-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    background: var(--mg-soft);
    border: 1px solid var(--mg-line);
    border-radius: 9px;
}
.mg-seg button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mg-muted);
}
.mg-seg button.on { background: rgba(255, 255, 255, 0.16); color: #fff; }
.mg-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; }
.mg-gridline { stroke: var(--mg-line); }
.mg-point { fill: #fff; }
.mg-link { stroke: var(--mg-grey); stroke-dasharray: 2 2; }
.mg-sel { stroke: #fff; }
.mg-clk { cursor: pointer; }

.mg-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.mg-lg {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--mg-line);
    border-radius: 10px;
    text-align: left;
    color: inherit;
    transition: all 0.15s;
}
.mg-lg:hover { border-color: rgba(255, 255, 255, 0.45); }
.mg-lg.on { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.mg-lg.dim { opacity: 0.45; }
.mg-nm { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.mg-vv { display: block; margin: 4px 0 2px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mg-sh { display: block; height: 5px; margin: 6px 0; background: var(--mg-line); border-radius: 3px; overflow: hidden; }
.mg-sh span { display: block; height: 5px; border-radius: 3px; }
.mg-lg-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.mg-lg .mg-sub { font-size: 11px; }

.mg-tbl-wrap { overflow-x: auto; }
.mg-body th {
    padding: 8px 7px;
    border-bottom: 1px solid var(--mg-line);
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--mg-muted);
}
.mg-body thead tr.mg-grp th { border-bottom: 2px solid var(--mg-line); text-align: center; color: #fff; }
.mg-body thead tr.mg-grp th.mg-g { background: var(--mg-soft); border-radius: 6px 6px 0 0; }
.mg-body th:first-child, .mg-body td:first-child { text-align: left; }
.mg-body td {
    padding: 12px 7px;
    border-bottom: 1px solid var(--mg-line);
    text-align: right;
    white-space: nowrap;
}
.mg-body td.mg-g { background: var(--mg-soft); }
.mg-body tbody tr { cursor: pointer; transition: background 0.1s; }
.mg-body tbody tr:hover td, .mg-body tbody tr.sel td { background: rgba(255, 255, 255, 0.1); }
.mg-body tbody tr.dim { opacity: 0.45; }
.mg-body tfoot td { border-top: 2px solid var(--mg-line); border-bottom: 0; font-weight: 700; }
.mg-prod { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.mg-ref { display: block; font-size: 11px; font-weight: 400; color: var(--mg-muted); }
.mg-arrow { margin: 0 6px; color: var(--mg-muted); }
.mg-ibar {
    position: relative;
    display: inline-block;
    width: 48px; height: 8px;
    margin-left: 8px;
    background: var(--mg-line);
    border-radius: 4px;
    vertical-align: middle;
    overflow: hidden;
}
.mg-ibar i { position: absolute; top: 0; height: 8px; border-radius: 4px; }

.mg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.mg-step { display: flex; flex-direction: column; gap: 8px; }
.mg-big { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mg-per { font-size: 14px; font-weight: 600; color: var(--mg-muted); }
.mg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-btn {
    align-self: flex-start;
    padding: 8px 14px;
    background: var(--accent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #001a33;
    transition: background 0.2s;
}
.mg-btn:hover { background: #fff; }
.mg-btn.ghost { background: var(--mg-soft); border: 1px solid var(--mg-line); color: #fff; }
.mg-btn.ghost:hover { border-color: #fff; }
.mg-btn.sm { padding: 4px 9px; font-size: 11px; }

.mg-explain-title { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.mg-flow {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 10px 8px;
    margin: 6px 0 4px;
    font-variant-numeric: tabular-nums;
}
.mg-flow .mg-l { font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--mg-muted); }
.mg-flow .mg-a { text-align: right; color: var(--mg-muted); }
.mg-flow .mg-b { text-align: right; font-weight: 700; white-space: nowrap; }
.mg-res {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 600;
}
.mg-sim { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--mg-line); }
.mg-sim input[type="range"] { width: 100%; margin: 8px 0; accent-color: var(--accent); cursor: pointer; }
.mg-sim-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--mg-muted); }
.mg-kv {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    margin: 10px 0;
    padding: 10px 14px;
    background: var(--mg-soft);
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}
.mg-kv .mg-l { font-size: 12px; color: var(--mg-muted); }
.mg-kv .mg-v { text-align: right; font-weight: 700; }

/* Infobulle : suit la souris, par-dessus le tableau de bord */
.mg-tip {
    position: fixed;
    z-index: 10;
    max-width: 260px;
    padding: 7px 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
}

@media (max-width: 960px) {
    .mg-kpis { grid-template-columns: repeat(2, 1fr); }
    .mg-c21, .mg-steps { grid-template-columns: 1fr; }
    .mg-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .mg-body { padding: 18px 14px 20px; }
    .mg-card { padding: 14px; }
    .mg-k-val { font-size: 21px; }
    .mg-period span { min-width: 112px; }
    /* Détail d'un produit : le libellé passe sur sa propre ligne, les valeurs dessous */
    .mg-flow { grid-template-columns: 1fr auto auto; gap: 4px 10px; }
    .mg-flow .mg-l { grid-column: 1 / -1; margin-top: 8px; }
    .mg-flow > span:empty { display: none; }
    .mg-flow .mg-a { text-align: left; }
}
@media (max-width: 420px) {
    .mg-kpis { grid-template-columns: 1fr; }
}

/* ----- Cas « Prévoir les ventes » ----- */
.ventes-chart { position: absolute; inset: 0; }
.ventes-chart svg { display: block; }
.ventes-year { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
/* Zone à dessiner : l'année à prévoir */
.ventes-zone { fill: rgba(217, 89, 38, 0.1); }
.ventes-zone-edge { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; stroke-dasharray: 4 4; }   /* une limite, pas une grille */
.ventes-hint { font-size: 12px; font-weight: 600; fill: rgba(255, 255, 255, 0.9); text-anchor: middle; pointer-events: none; }
.ventes-draw-zone { fill: transparent; cursor: crosshair; touch-action: none; }
.ventes-line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.ventes-line.is-real { stroke: rgba(255, 255, 255, 0.9); }
.ventes-line.is-you { stroke: #d95926; stroke-width: 2.5; }
.ventes-line.is-model { stroke: #3987e5; }
/* Anneau de la couleur du fond : les points restent lisibles sur les courbes */
.ventes-dot { stroke: #071f3a; stroke-width: 1.5; }
.ventes-dot.is-real { fill: #fff; }
.ventes-dot.is-you { fill: #d95926; }
.ventes-dot.is-model { fill: #3987e5; }
.ventes-bar.is-you { fill: #d95926; }
.ventes-bar.is-model { fill: #3987e5; }
/* Liseré de la couleur du fond : le libellé reste lisible si une barre passe derrière */
.ventes-side {
    font-size: 11px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.85);
    paint-order: stroke;
    stroke: #071f3a;
    stroke-width: 4px;
    stroke-linejoin: round;
}
.game-dot.is-you { background: #d95926; }
.game-dot.is-model { background: #3987e5; }
.ventes-stock th,
.ventes-stock td { padding: 9px 0; }
.ventes-stock th { padding-top: 0; }
.ventes-stock th .game-dot { margin-right: 6px; }
.ventes-stock th:not(:first-child),
.ventes-stock td:not(:first-child) { padding-left: 14px; text-align: right; white-space: nowrap; }
.ventes-stock td:not(:first-child) { font-weight: 600; color: #fff; }
.game-panel .ventes-hypo { margin-top: 6px; }

/* ----- Cas « Tracer la tournée » ----- */
.tour-map { position: absolute; inset: 0; }
.tour-map svg { display: block; }
.tour-route {
    fill: none;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.tour-route.is-you { stroke: #d95926; }
.tour-route.is-faded { stroke-opacity: 0.6; }
.tour-route.is-best { stroke: #3987e5; stroke-width: 3.5; }
.tour-hit { fill: transparent; }
/* Anneau autour des arrêts à heure limite */
.tour-ring { fill: none; stroke: #fff; stroke-width: 1.5; }
/* Anneau de la couleur du fond : les points restent lisibles sur les tracés */
.tour-dot { fill: #fff; stroke: #071f3a; stroke-width: 2; }
.tour-stop { outline: none; }
#cas-tournee[data-phase="1"] .tour-stop:not(.is-visited) { cursor: pointer; }
#cas-tournee[data-phase="1"] .tour-stop:not(.is-visited):hover .tour-dot,
.tour-stop:focus-visible .tour-dot { stroke: var(--accent); stroke-width: 3; }
.tour-stop.is-visited .tour-dot { fill: #d95926; }
.tour-num {
    font-size: 10px;
    font-weight: 700;
    fill: #fff;
    text-anchor: middle;
    pointer-events: none;
}
.tour-label { font-size: 11px; fill: rgba(255, 255, 255, 0.72); pointer-events: none; }
.tour-limit { font-size: 10.5px; font-weight: 600; fill: #fff; }
/* L'icône porte la couleur d'état, l'heure reste blanche */
.tour-limit .is-good { fill: #2fc42f; }
.tour-limit .is-bad { fill: #ff7b7b; }
.game-panel .tour-clock { margin-top: 14px; font-size: 0.88rem; color: #fff; }
.tour-depot { fill: #fff; stroke: #071f3a; stroke-width: 2; }
.tour-depot-label { font-size: 11px; font-weight: 700; fill: #fff; }

/* ----- Cas « Lire une facture » ----- */
#cas-facture .game-stage { display: grid; align-items: center; }
.facture-paper { display: grid; justify-items: center; padding: 20px 16px; }

/* La feuille : papier blanc, encre sombre, une couleur par fournisseur */
.facture {
    --facture-accent: #1c4a82;
    display: flex;
    flex-direction: column;
    width: min(100%, 440px);
    padding: 20px 22px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 11.5px;
    line-height: 1.45;
    color: #0e1628;
}
.facture header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--facture-accent);
}
.facture-supplier strong { display: inline-block; padding: 1px 5px; margin-left: -5px; font-size: 13px; }
.facture-supplier span { display: block; color: #6b7280; }
.facture-title { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; color: var(--facture-accent); }
.facture-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 14px;
    margin: 10px 0 8px;
}
.facture dl div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 5px;
}
.facture dt { color: #6b7280; }
.facture dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.facture-lines { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.facture-lines th {
    padding: 4px 5px;
    border-bottom: 1px solid #d5dae5;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
}
.facture-lines td { padding: 4px 5px; border-bottom: 1px solid #eef1f6; }
.facture-lines th:not(:first-child),
.facture-lines td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.facture-totals { width: 58%; margin-left: auto; }
.facture-totals .is-total { margin-top: 2px; border-top: 1px solid #0e1628; font-size: 13px; }
.facture-totals .is-total dt,
.facture-totals .is-total dd { font-weight: 800; color: #0e1628; }
.facture footer { margin-top: 10px; font-size: 10px; color: #6b7280; }

/* Mise en page B : bandeau de couleur, références en liste, totaux en trois cases */
.facture-b { --facture-accent: #0f6b63; }
.facture-b header {
    align-items: center;
    margin: -20px -22px 0;
    padding: 14px 22px;
    background: var(--facture-accent);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.facture-b .facture-supplier strong,
.facture-b .facture-title { color: #fff; }
.facture-b .facture-supplier span { color: rgba(255, 255, 255, 0.8); }
.facture-b .facture-meta { grid-template-columns: 1fr; margin-top: 12px; }
.facture-b .facture-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}
.facture-b .facture-totals div {
    flex-direction: column;
    gap: 0;
    padding: 6px 8px;
    background: #f1f4f8;
    border-radius: 4px;
}
.facture-b .facture-totals dd { text-align: left; }
.facture-b .facture-totals .is-total { margin-top: 0; border-top: none; background: var(--facture-accent); }
.facture-b .facture-totals .is-total dt,
.facture-b .facture-totals .is-total dd { color: #fff; }

/* Mise en page C : en-tête centré, montant dû placé avant le détail */
.facture-c { --facture-accent: #7a3566; }
.facture-c header {
    flex-direction: column-reverse;
    align-items: center;
    gap: 2px;
    border-bottom: 1px dashed #9aa3b2;
    text-align: center;
}
.facture-c .facture-supplier strong { margin-left: 0; }
.facture-c .facture-totals { order: 1; width: 100%; margin: 10px 0 0; padding: 4px; background: #f6f1f5; border-radius: 4px; }
.facture-c .facture-meta { order: 2; }
.facture-c .facture-lines { order: 3; }
.facture-c footer { order: 4; }

/* Zones de la facture : cliquables à l'étape 2, surlignées quand elles sont trouvées ou lues */
.facture [data-field] { border-radius: 4px; outline: 2px solid transparent; outline-offset: -1px; transition: background 0.15s, outline-color 0.15s; }
#cas-facture[data-phase="2"] .facture [data-field] { cursor: pointer; }
#cas-facture[data-phase="2"] .facture [data-field]:hover,
.facture [data-field]:focus-visible { background: rgba(28, 74, 130, 0.1); }
.facture .is-found { background: rgba(12, 163, 12, 0.14); outline-color: #0ca30c; }
.facture .is-wrong { background: rgba(208, 59, 59, 0.14); outline-color: #d03b3b; }
.facture .is-read { background: rgba(241, 155, 55, 0.22); outline-color: var(--accent); }
.facture-b header .is-read,
.facture-b header .is-found,
.facture-b .is-total.is-read,
.facture-b .is-total.is-found { outline-color: #fff; }

.facture-target { color: var(--accent); }
.game-panel .facture-timer { margin-top: 4px; color: #fff; }
.facture-timer strong { font-size: 1.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.facture-todo,
.facture-checks {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--game-soft);
}
.facture-checks { gap: 5px; font-size: 0.84rem; line-height: 1.4; }
.facture-todo li,
.facture-checks li { display: flex; align-items: baseline; gap: 8px; }
.facture-todo .is-current,
.facture-checks .is-alert { font-weight: 600; color: #fff; }
.facture-todo b { color: #fff; font-variant-numeric: tabular-nums; }
.facture-fields td { padding: 3px 0; font-size: 0.84rem; line-height: 1.35; }
.facture-fields td:last-child { font-weight: 600; color: #fff; }
.game-panel .facture-verdict { min-height: 0; margin-top: 12px; font-size: 0.92rem; }

.game-note {
    max-width: 720px;
    margin: 18px auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .cas-picker { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    /* Cinq cartes sur deux colonnes : la première prend toute la largeur */
    .cas-card:first-child { grid-column: 1 / -1; }
    .game-main { grid-template-columns: 1fr; }
    .game-main { min-height: 0; }
    .game-stage {
        height: 360px;
        border-right: none;
        border-bottom: 1px solid var(--game-line);
    }
    /* La facture a sa propre hauteur : la scène s'y adapte */
    #cas-facture .game-stage { height: auto; }
    /* Plus de hauteur pour dessiner la courbe au doigt */
    #cas-ventes .game-stage { height: 400px; }
    .game-side { padding: 28px 24px 12px; }
}

@media (max-width: 640px) {
    .game-hud { padding: 16px 18px; }
    /* Seul le niveau en cours garde son libellé : les cinq pastilles tiennent sur une ligne */
    .game-steps { gap: 6px; }
    .game-steps [data-goto] { padding: 4px 12px 4px 4px; font-size: 0.8rem; }
    .game-steps b { width: 22px; height: 22px; }
    .game-steps [data-goto]:not(.is-current) { padding-right: 4px; }
    .game-steps [data-goto]:not(.is-current) span { display: none; }
    /* Sur mobile, la carte se réduit à son icône et à sa question */
    .cas-card { padding: 14px; gap: 8px; }
    .cas-card-icon { width: 34px; height: 34px; }
    .cas-card-icon svg { width: 18px; height: 18px; }
    .cas-card strong { font-size: 0.9rem; }
    .cas-card-text, .cas-card-apps, .cas-card-go { display: none; }
    .game-side { padding: 24px 18px 8px; }
    .game-actions { padding: 16px 18px 20px; justify-content: stretch; }
    .game-next { flex: 1; justify-content: center; }
    .game-table th, .game-table td { padding-left: 12px; padding-right: 12px; }
    .facture { padding: 16px; font-size: 11px; }
    .facture-meta { grid-template-columns: 1fr; }
    .facture-b header { margin: -16px -16px 0; padding: 12px 16px; }
    .game-orders th:nth-child(3), .game-orders td:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .game-next { animation: none; }
}

/* ============= ABOUT ============= */
.about { background: var(--surface); }

.profiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.profile-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.profile-card:hover::before { opacity: 1; }

.profile-photo {
    width: 120px; height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 24px;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #dee7f3, #fdf3e3);
}

.profile-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.profile-role {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 8px;
}

.profile-card h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.profile-school {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    font-weight: 500;
}

.profile-bio {
    color: var(--text-soft);
    margin-bottom: 22px;
    font-size: 0.97rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tags span {
    padding: 6px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-soft);
}

/* ============= CLIENTS (orbit) ============= */
.clients {
    background: var(--surface);
    overflow: hidden;
}

.orbit-stage {
    perspective: 1500px;
    height: 340px;
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.orbit-stage.is-dragging,
.orbit-stage.is-dragging .orbit-card {
    cursor: grabbing;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: rotateX(-6deg);
    will-change: transform;
}

.orbit-card {
    --count: 8;
    --radius: 380px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170px;
    height: 100px;
    margin: -50px 0 0 -85px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 22px;
    transform: rotateY(calc(var(--i) * (360deg / var(--count)))) translateZ(var(--radius));
    backface-visibility: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
    font-family: inherit;
}

.orbit-card.is-active {
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(0, 52, 98, 0.22);
}

.orbit-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(35%);
    opacity: 0.9;
    transition: filter 0.3s, opacity 0.3s;
    pointer-events: none;
    user-select: none;
}

.orbit-card:hover {
    box-shadow: var(--shadow-lg);
}

.orbit-card:hover img {
    filter: none;
    opacity: 1;
}

.clients-list,
.only-list {
    display: none;
}

@media (max-width: 820px) {
    .orbit-stage,
    .only-ring { display: none; }
    .only-list { display: inline; }
    .clients-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        list-style: none;
        padding: 24px 0 0;
    }
    .clients-list li {
        padding: 0;
    }
    .clients-list button {
        padding: 10px 18px;
        background: var(--surface-soft);
        border: 1px solid var(--border);
        border-radius: 999px;
        font-weight: 500;
        font-size: 0.92rem;
        color: var(--text-soft);
        font-family: inherit;
        cursor: pointer;
        transition: all 0.2s;
    }
    .clients-list button:hover,
    .clients-list button.is-active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }
}

/* Detail panel (clicked logo) */
.client-detail {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 32px 36px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.client-detail.is-updating {
    opacity: 0;
    transform: translateY(8px);
}

.client-detail-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
}

.client-detail-desc {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Anneau en rotation auto : hauteur réservée pour que le texte qui change ne fasse pas sauter la page */
@media (min-width: 821px) {
    .client-detail {
        min-height: 210px;   /* texte le plus long (Otoqi) : 204px */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .client-detail { padding: 24px 22px; }
    .client-detail-title { font-size: 1.15rem; }
}

/* ============= SERVICES ============= */
.services { background: var(--surface-soft); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #fff;
    padding: 36px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 52, 98, 0.08), rgba(241, 155, 55, 0.12));
    color: var(--primary);
    margin-bottom: 22px;
}
.service-icon svg { width: 26px; height: 26px; }

.service-card h3 { margin-bottom: 10px; }

.service-card p {
    color: var(--text-soft);
    font-size: 0.96rem;
}

/* ============= REALISATIONS ============= */
.realisations { background: var(--surface); }

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.realisation-card {
    background: #fff;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.realisation-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.realisation-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 12px;
    padding: 5px 12px;
    background: rgba(0, 52, 98, 0.08);
    border-radius: 6px;
}

.realisation-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.realisation-card p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* ============= BLOCS COMMUNS AUX PAGES ============= */
/* Pastille d'icône, reprise des cartes de services */
.tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 52, 98, 0.08), rgba(241, 155, 55, 0.12));
    color: var(--primary);
}
.tile-icon svg { width: 24px; height: 24px; }

.section-cta { margin-top: 44px; text-align: center; }

.btn-accent {
    background: var(--accent);
    color: #001a33;
}
.btn-accent:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* Bloc sombre : appel à l'action de fin de page. Collé à la section précédente quand elle a le même fond blanc. */
.cta-section { background: var(--surface); padding-top: 0; }
.usecase + .cta-section,
.methode + .cta-section { padding-top: 110px; }
.cta-band {
    position: relative;
    overflow: hidden;
    padding: 64px;
    background: linear-gradient(135deg, #001a33 0%, #003462 100%);
    border-radius: var(--radius-lg);
    text-align: center;
    color: #fff;
}
.cta-band::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(241, 155, 55, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 16px; }
.cta-band > p {
    max-width: 640px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.8);
}

/* ============= ACCUEIL ============= */
.pains { background: var(--surface); }
.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    list-style: none;
}
.pain-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pain-card p { font-size: 0.98rem; font-weight: 500; }
.offers { background: var(--surface-soft); }
.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}
.offer-card {
    display: block;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}
.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.offer-card h3 { margin: 18px 0 8px; }
.offer-card p { font-size: 0.92rem; color: var(--text-soft); }

.try { background: var(--surface-soft); padding-top: 0; }
/* Une carte cliquable par démonstrateur : un aperçu dessiné, puis un bouton « Tester » bien visible */
.try .cta-band { padding-left: 40px; padding-right: 40px; }
.try .cta-band > p { margin-bottom: 36px; }
.try-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    list-style: none;
    text-align: left;
}
.try-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 14px 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.try-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}
.try-visual {
    display: block;
    margin-bottom: 6px;
    background: #071f3a;
    border-radius: 10px;
    overflow: hidden;
}
.try-visual svg { display: block; width: 100%; height: auto; }
.try-card strong {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.08rem;
    line-height: 1.25;
}
.try-text { margin-bottom: 8px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); }
/* Faux bouton : c'est toute la carte qui se clique */
.try-go {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: auto;
    padding: 9px 18px;
    background: var(--accent);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #001a33;
    transition: background 0.2s;
}
.try-go svg { width: 16px; height: 16px; transition: transform 0.2s; }
.try-card:hover .try-go { background: #fff; }
.try-card:hover .try-go svg { transform: translateX(3px); }

.duo { background: var(--surface); }
.duo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 780px;
    margin: 0 auto;
}
.duo-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.duo-card img {
    width: 76px; height: 76px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}
.duo-card h3 { font-size: 1.15rem; }
.duo-card .duo-role { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.duo-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ============= SOLUTIONS ============= */
.solutions { background: var(--surface); padding-top: 40px; }
.solution {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    padding: 44px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 80px;     /* lien direct depuis l'accueil, sous la barre fixe */
}
.solution:first-child { border-top: none; }
.solution-head h2 { margin: 18px 0 12px; font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.solution-goal { font-weight: 500; color: var(--primary); }
.solution-goal strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.solution-body > p { color: var(--text-soft); }
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    list-style: none;
}
.chips li {
    padding: 7px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-soft);
}
.solution-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; }
.solution-links a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.solution-links a:hover { color: var(--accent); }

/* ============= NOTRE APPROCHE ============= */
.principles {
    display: grid;
    gap: 14px;
    max-width: 640px;
    margin: 6px auto 32px;
    list-style: none;
    text-align: left;
}
.principles li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
}
.principles svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; color: var(--accent); stroke-width: 2.6; }

/* ============= QUI SOMMES-NOUS ============= */
.clients-close {
    max-width: 720px;
    margin: 36px auto 0;
    text-align: center;
    color: var(--text-soft);
}
.clients .section-cta { margin-top: 28px; }
/* Profils puis parcours : deux sections blanches, une seule respiration entre elles */
.about + .clients { padding-top: 10px; }

/* ============= CONTACT : phrases d'exemple ============= */
.examples { display: grid; gap: 8px; margin-bottom: 30px; list-style: none; }
.example {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    text-align: left;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    transition: all 0.2s;
}
.example:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.1); }
.contact-card .contact-text > p { margin-bottom: 14px; }
/* L'en-tête de page fait déjà l'introduction : la première section le suit de près */
.page-hero + section { padding-top: 48px; }

/* ============= METHODE ============= */
.methode { background: var(--surface-soft); }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
}

.step {
    background: #fff;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
}

.step-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    line-height: 1;
}

.step h3 { margin-bottom: 8px; font-size: 1.15rem; }

.step p {
    color: var(--text-soft);
    font-size: 0.92rem;
}

/* ============= CONTACT ============= */
.contact {
    background: var(--surface);
    padding-bottom: 140px;
}

.contact-card {
    background: linear-gradient(135deg, #001a33 0%, #003462 100%);
    border-radius: var(--radius-lg);
    padding: 64px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(241, 155, 55, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.contact-text h2 { color: #fff; margin-bottom: 18px; }

.contact-text p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 32px;
    font-size: 1.02rem;
}

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
}

.contact-list svg {
    width: 20px; height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-list a {
    color: inherit;
    transition: color 0.2s;
}
.contact-list a:hover { color: var(--accent); }

.contact-form {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form span {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.02em;
}

.contact-form span em {
    font-style: normal;
    font-weight: 400;
    opacity: 0.7;
}

/* Champ piège anti-robots : hors écran, jamais vu ni atteint au clavier */
.contact-form .form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.96rem;
    transition: all 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    background: var(--accent);
    color: #001a33;
    margin-top: 6px;
}
.contact-form .btn-primary:hover {
    background: #fff;
    color: var(--primary);
}

.form-status {
    margin: 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.form-status.is-success {
    background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.4);
    color: #d3f9e0;
}
.form-status.is-error {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.45);
    color: #ffdcdc;
}
.form-status a { text-decoration: underline; }

.form-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin: 0;
}

/* ============= FOOTER ============= */
.footer {
    background: #001a33;
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 36px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer-brand p {
    font-size: 0.92rem;
    max-width: 380px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 0.9rem;
}
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* Copyright sur sa propre ligne, sous un filet */
.footer-meta {
    flex-basis: 100%;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.88rem;
}
.footer-meta p { margin: 2px 0; }

/* ============= RESPONSIVE ============= */
/* Six entrées de menu : le menu déroulant prend le relais avant qu'elles ne se serrent */
@media (max-width: 1100px) {
    .nav-links {
        position: fixed;
        top: 72px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px;
        gap: 18px;
        border-bottom: 1px solid var(--border);
        /* -100 % ne suffit pas : le menu part de top: 72px, il faut aussi remonter la hauteur de la barre */
        transform: translateY(calc(-100% - 72px));
        visibility: hidden;
        transition: transform 0.3s, visibility 0.3s;
    }
    .nav-links.open { transform: translateY(0); visibility: visible; }
    .nav-toggle { display: flex; }
}

@media (max-width: 960px) {
    .profiles { grid-template-columns: 1fr; }
    .pain-grid { grid-template-columns: repeat(2, 1fr); }
    .try-grid { grid-template-columns: repeat(2, 1fr); }
    .try .cta-band { padding-left: 32px; padding-right: 32px; }
    .solution { grid-template-columns: 1fr; gap: 20px; }
    .cta-band { padding: 48px 32px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .realisations-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .contact-card { grid-template-columns: 1fr; padding: 40px; gap: 40px; }
    .hero-stats { gap: 32px; }
}

@media (max-width: 640px) {
    section { padding: 80px 0; }
    .hero { padding: 130px 0 80px; }
    .services-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-hero { padding: 120px 0 48px; }
    .usecase + .cta-section,
    .methode + .cta-section { padding-top: 80px; }
    .pain-grid, .duo-grid { grid-template-columns: 1fr; }
    /* Sur mobile : une carte par ligne, l'aperçu à gauche, le titre et le bouton à droite */
    .try-grid { grid-template-columns: 1fr; gap: 12px; }
    .try .cta-band { padding-left: 22px; padding-right: 22px; }
    .try-card {
        display: grid;
        grid-template-columns: 104px 1fr;
        align-items: center;
        gap: 6px 14px;
        padding: 12px;
    }
    .try-visual { grid-row: span 2; margin-bottom: 0; }
    .try-text { display: none; }
    .try-card .try-go { justify-self: start; margin-top: 0; padding: 7px 14px; font-size: 0.85rem; }
    .cta-band { padding: 40px 22px; }
    .footer-links { justify-content: center; }
    .contact-card { padding: 32px 24px; }
    .footer-grid { flex-direction: column; text-align: center; }
    .footer-meta { text-align: center; }
    .stat-value { font-size: 1.8rem; }
}

/* ============= ANIMATIONS ============= */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
