/* ==========================================================================
   Diamontis Remote Support - Landing
   Inspiré du design system v2.diamontis.fr (Inter + Space Grotesk + violet)
   ========================================================================== */

/* --- Polices auto-hébergées (sous-ensemble latin, woff2 variable) --- */
/* Inter et Space Grotesk servis localement depuis ../fonts/ pour éviter */
/* toute dépendance externe (Google Fonts) - RGPD + performance. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-var.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-var.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Design Tokens (alignés sur v2.diamontis.fr) --- */
:root {
    /* Primary palette Diamontis */
    --primary: #4a1a8a;
    --primary-light: #6b3fa0;
    --primary-hover: #5a2599;
    --primary-dark: #3a1070;
    --primary-rgb: 74, 26, 138;

    /* Accents */
    --accent-start: #8b5cf6;
    --accent-end: #6366f1;
    --accent-text: #6d28d9;   /* accent lisible sur fond clair, 7,0:1 */
    --secondary: #4361ee;
    --success: #8db549;

    /* Light theme */
    --heading: #1a1033;
    --body: #4a4560;
    --surface: #ffffff;
    --surface-2: #f3f0fb;
    --border: #ddd8ee;
    --bg: #ffffff;

    /* Topbar / footer */
    --topbar-bg: #0f0a1a;
    --footer-bg: #0f0a1a;
    --footer-copy-bg: #1a1030;

    /* Glass */
    --glass-bg: rgba(74, 26, 138, 0.04);
    --glass-border: rgba(74, 26, 138, 0.10);

    /* Shapes */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    --shadow-sm: 0 2px 8px rgba(74, 26, 138, 0.08);
    --shadow-md: 0 8px 30px rgba(74, 26, 138, 0.13);
    --shadow-lg: 0 20px 60px rgba(74, 26, 138, 0.18);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.20);

    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

    --container-max: 1200px;
    --container-pad: clamp(16px, 4vw, 32px);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    --accent-text: #a78bfa;   /* 7,3:1 sur le fond sombre */
    --heading: #f0ecf8;
    --body: #b0adc0;
    --surface: #1a1330;
    --surface-2: #201840;
    --border: #2a2045;
    --bg: #0f0a1a;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.10);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.50);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Forme canonique du reset image. Les deux sélecteurs d'attribut precedents
   (`img[height]`, `img[width][height]`) valaient 0-2-1 en specificite et
   l'emportaient donc sur `.dia-brand img` (0-1-1), pourtant declaree plus bas :
   le logo, qui porte width="180" height="44", repassait en hauteur naturelle
   et affichait l'en-tete a 131 px au lieu de 72. Un `img` nu vaut 0-0-1, toute
   regle de classe reprend la main. Le ratio reste tenu par les attributs
   width/height du HTML, qui evitent aussi le decalage de mise en page. */
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
/* Icones du sprite SVG (cf. le <svg> masque en tete de <body>). Dimensionnees
   en `em` et peintes en `currentColor` : elles heritent de font-size et de
   color exactement comme le faisaient les <i> du webfont, donc les regles
   existantes qui reglaient la taille ou la couleur des icones continuent de
   s'appliquer sans etre reecrites. */
.dia-i {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}
/* --accent-text : variante de l'accent reservee au TEXTE sur fond clair.
   --accent-start (#8b5cf6) ne donne que 4,23:1 sur blanc, sous le seuil AA de
   4,5:1. #6d28d9 atteint 7,0:1 et vient de la meme charte. */
a { color: var(--accent-text); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-end); }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    transition: color 0.3s ease;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.125rem; line-height: 1.7; color: var(--body); font-weight: 400; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent-start); color: #fff; }

/* --- Container --- */
.dia-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* --- Skip link --- */
.dia-skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    z-index: 100000;
    transition: top 0.2s ease;
}
.dia-skip-link:focus { top: 0; color: #fff; outline: 3px solid var(--accent-start); }
:focus-visible { outline: 3px solid var(--accent-start); outline-offset: 2px; border-radius: 4px; }

/* --- Topbar --- */
.dia-topbar {
    background: var(--topbar-bg);
    color: #cdc6e4;
    font-size: 13px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dia-topbar .dia-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.dia-topbar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}
.dia-topbar-list li { display: inline-flex; align-items: center; gap: 6px; }
.dia-topbar-list i, .dia-topbar-list .dia-i { color: var(--accent-start); }
.dia-topbar-list a { color: #cdc6e4; }
.dia-topbar-list a:hover { color: #fff; }
.dia-topbar-right { margin-left: auto; }
@media (max-width: 768px) {
    .dia-topbar { display: none; }
}

/* --- Navbar --- */
.dia-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .dia-navbar {
    background: rgba(15, 10, 26, 0.92);
}
.dia-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}
.dia-brand { display: flex; align-items: center; }
.dia-brand img { height: 44px; width: auto; }
[data-theme="light"] .dia-brand-dark { display: none; }
[data-theme="dark"] .dia-brand-light { display: none; }

.dia-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dia-nav-links > li > a {
    color: var(--heading);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.dia-nav-links > li > a:hover {
    background: var(--surface-2);
    color: var(--primary);
}
[data-theme="dark"] .dia-nav-links > li > a:hover { color: var(--accent-start); }

.dia-nav-cta {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}
.dia-nav-cta:hover {
    background: linear-gradient(135deg, var(--accent-end), var(--accent-start)) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}
.dia-nav-tech {
    border: 1px solid var(--border);
}

/* Theme switch (pill avec thumb glissant + sun/moon) */
.dia-theme-switch {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    transition: background-color 0.2s ease;
}
.dia-theme-switch:hover { background: var(--surface-2); }
.dia-theme-switch:focus-visible {
    outline: 3px solid var(--accent-start);
    outline-offset: 2px;
}

.dia-theme-switch-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 56px;
    height: 28px;
    padding: 0 7px;
    background: linear-gradient(135deg, #1a1330, #2a2045);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.dia-theme-switch-track i, .dia-theme-switch-track .dia-i {
    font-size: 11px;
    line-height: 1;
    z-index: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.dia-theme-switch-sun { color: #facc15; }
.dia-theme-switch-moon { color: #cdc6e4; }

.dia-theme-switch-thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ffffff, #f3f0fb);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
    z-index: 2;
}

/* Light theme : thumb à gauche (sur le soleil), fond clair */
[data-theme="light"] .dia-theme-switch-track {
    background: linear-gradient(135deg, #ddd8ee, #f3f0fb);
    border-color: var(--border);
}
[data-theme="light"] .dia-theme-switch-thumb {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    transform: translate(0, -50%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}
[data-theme="light"] .dia-theme-switch-sun { opacity: 0; }
[data-theme="light"] .dia-theme-switch-moon { opacity: 1; color: #6b3fa0; }

/* Dark theme : thumb à droite (sur la lune), fond sombre */
[data-theme="dark"] .dia-theme-switch-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: translate(28px, -50%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
}
[data-theme="dark"] .dia-theme-switch-sun { opacity: 1; }
[data-theme="dark"] .dia-theme-switch-moon { opacity: 0; }

.dia-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--heading);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

@media (max-width: 992px) {
    .dia-nav-toggle { display: inline-flex; }
    .dia-nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        box-shadow: var(--shadow-md);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        /* visibility, et pas seulement opacity : sans elle les six liens du
           menu ferme restaient atteignables au clavier, invisibles a l'ecran.
           Le delai laisse la transition de fermeture se jouer. */
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
    }
    .dia-nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transition-delay: 0s;
    }
    .dia-nav-links > li > a { padding: 12px 16px; }
}

/* --- Buttons --- */
.dia-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: -0.01em;
    line-height: 1.4;
    white-space: nowrap;
}
.dia-btn:focus-visible { outline: 3px solid var(--accent-start); outline-offset: 2px; }

.dia-btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.dia-btn-xl { padding: 18px 40px; font-size: 17px; border-radius: var(--radius); }

.dia-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(74, 26, 138, 0.3);
}
.dia-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 26, 138, 0.4);
}

.dia-btn-accent {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.dia-btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-end), var(--accent-start));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
}

.dia-btn-outline {
    background: transparent;
    color: var(--heading);
    border: 2px solid var(--border);
}
.dia-btn-outline:hover {
    border-color: var(--accent-start);
    color: var(--accent-start);
    background: var(--glass-bg);
    transform: translateY(-2px);
}

.dia-btn-light {
    background: #fff;
    color: var(--primary);
}
.dia-btn-light:hover {
    background: #f5f0ff;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.dia-btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}
.dia-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* --- Sections génériques --- */
.dia-section {
    padding: clamp(60px, 9vw, 110px) 0;
    position: relative;
}
.dia-section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 56px;
}
.dia-overline {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-start);
    margin-bottom: 14px;
}
.dia-gradient-text {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero --- */
.dia-hero {
    position: relative;
    padding: clamp(60px, 8vw, 120px) 0 clamp(60px, 8vw, 100px);
    background:
        radial-gradient(ellipse 60% 70% at 80% 20%, rgba(139, 92, 246, 0.12), transparent 70%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(74, 26, 138, 0.08), transparent 70%);
    overflow: hidden;
}
[data-theme="dark"] .dia-hero {
    background:
        radial-gradient(ellipse 60% 70% at 80% 20%, rgba(139, 92, 246, 0.18), transparent 70%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(99, 102, 241, 0.10), transparent 70%);
}

.dia-hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.dia-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orbFloat 20s ease-in-out infinite;
}
.dia-orb-1 { width: 380px; height: 380px; background: var(--accent-start); top: -80px; left: -100px; }
.dia-orb-2 { width: 320px; height: 320px; background: var(--accent-end); top: 30%; right: -100px; animation-delay: -7s; }
.dia-orb-3 { width: 280px; height: 280px; background: var(--primary); bottom: -100px; left: 30%; animation-delay: -14s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, -50px); }
    66% { transform: translate(-30px, 30px); }
}

.dia-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}
@media (max-width: 992px) {
    .dia-hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.dia-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.dia-pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(141, 181, 73, 0.6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(141, 181, 73, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(141, 181, 73, 0); }
    100% { box-shadow: 0 0 0 0 rgba(141, 181, 73, 0); }
}

.dia-hero-content h1 { margin-bottom: 24px; }
.dia-hero-content .lead { margin-bottom: 32px; font-size: 1.2rem; max-width: 560px; }

.dia-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 32px;
}
.dia-hero-bullets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dia-hero-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--body);
    font-size: 15px;
}
.dia-hero-bullets i, .dia-hero-bullets .dia-i { color: var(--success); font-size: 16px; }

/* Hero visual - mockup card */
.dia-hero-visual {
    position: relative;
}
.dia-hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.15);
    overflow: hidden;
    transform: rotate(-2deg);
    transition: transform 0.4s ease;
    max-width: 480px;
    margin: 0 auto;
}
.dia-hero-card:hover { transform: rotate(0) translateY(-5px); }

.dia-hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.dia-hero-dots {
    display: inline-flex;
    gap: 6px;
}
.dia-hero-dots i {
    display: block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #d4cfe6;
}
[data-theme="dark"] .dia-hero-dots i { background: #4a3f6b; }
.dia-hero-dots i:nth-child(1) { background: #ff5f56; }
.dia-hero-dots i:nth-child(2) { background: #ffbd2e; }
.dia-hero-dots i:nth-child(3) { background: #27c93f; }
.dia-hero-card-title {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--body);
}

.dia-hero-card-body {
    padding: 32px 28px;
}
.dia-id-display {
    text-align: center;
    padding: 28px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.dia-id-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--body);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.dia-id-value {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--heading);
    letter-spacing: 4px;
}
.dia-id-value span {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dia-hero-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.dia-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--body);
}
.dia-status-row i { color: var(--accent-start); width: 18px; text-align: center; }
.dia-status-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(141, 181, 73, 0.6);
    animation: pulse 2s infinite;
    margin: 0 4px;
}

.dia-mock-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    opacity: 0.85;
    cursor: not-allowed;
}

/* --- Steps section --- */
.dia-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}
.dia-step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 30px 32px;
    transition: all 0.3s ease;
    text-align: center;
}
.dia-step:hover {
    transform: translateY(-8px);
    border-color: var(--accent-start);
    box-shadow: var(--shadow-lg);
}
.dia-step-num {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}
.dia-step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--accent-start);
}
.dia-step h3 { margin-bottom: 10px; }
.dia-step p { color: var(--body); margin: 0; }

.dia-how-tip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    max-width: 760px;
    margin: 0 auto;
}
.dia-how-tip i, .dia-how-tip .dia-i { color: var(--accent-start); font-size: 22px; margin-top: 2px; }
.dia-how-tip p { margin: 0; color: var(--body); }

/* --- Download section --- */
.dia-section-download {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.dia-download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(32px, 5vw, 56px);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(32px, 5vw, 56px);
    align-items: center;
}
@media (max-width: 768px) {
    .dia-download-card { grid-template-columns: 1fr; text-align: center; }
}

.dia-download-content h2 { margin-bottom: 16px; }
.dia-download-content .lead { margin-bottom: 24px; }
.dia-download-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.dia-download-meta li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--body);
    font-size: 14.5px;
}
.dia-download-meta i { color: var(--accent-start); width: 22px; text-align: center; }

.dia-download-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: center;
}
.dia-download-actions .dia-btn { width: 100%; }
.dia-download-hint {
    margin: 0;
    font-size: 14px;
    color: var(--body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.dia-download-hint i, .dia-download-hint .dia-i { color: var(--success); }
.dia-download-help {
    text-align: left;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}
.dia-download-help summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--heading);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dia-download-help summary::-webkit-details-marker { display: none; }
.dia-download-help summary i, .dia-download-help summary .dia-i { color: var(--accent-start); }
.dia-download-help p {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--body);
}

/* --- Trust section --- */
.dia-section-trust {
    position: relative;
    overflow: hidden;
}
.dia-section-trust::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(139, 92, 246, 0.08), transparent 70%);
    pointer-events: none;
}
.dia-trust-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}
@media (max-width: 992px) {
    .dia-trust-grid { grid-template-columns: 1fr; }
}

.dia-trust-content h2 { margin-bottom: 16px; }
.dia-trust-content .lead { margin-bottom: 32px; }

.dia-trust-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.dia-trust-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.dia-trust-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}
.dia-trust-list strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 4px;
}
.dia-trust-list span {
    display: block;
    color: var(--body);
    font-size: 14.5px;
}

.dia-trust-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.dia-trust-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}
.dia-trust-card-header i, .dia-trust-card-header .dia-i { font-size: 22px; }
.dia-trust-card-header span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}
.dia-trust-badges {
    display: flex;
    flex-direction: column;
    padding: 16px;
}
.dia-trust-badges li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}
.dia-trust-badges li:last-child { border-bottom: none; }
/* Icone nue, sans cadre : le fond et la bordure alourdissaient la liste sans
   rien apporter. La taille reste tenue par font-size, les regles de .dia-i
   dimensionnant le SVG en `em`. */
.dia-trust-badges > li > i, .dia-trust-badges > li > .dia-i {
    color: var(--accent-start);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.dia-trust-badges strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--heading);
    font-size: 0.95rem;
}
.dia-trust-badges span {
    display: block;
    color: var(--body);
    font-size: 13px;
}

/* --- FAQ --- */
.dia-faq {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dia-faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
.dia-faq-item[open] {
    border-color: var(--accent-start);
    box-shadow: var(--shadow-sm);
}
.dia-faq-item summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--heading);
    padding: 18px 24px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}
.dia-faq-item summary::-webkit-details-marker { display: none; }
.dia-faq-item summary i, .dia-faq-item summary .dia-i {
    color: var(--accent-start);
    transition: transform 0.2s ease;
    font-size: 12px;
}
.dia-faq-item[open] summary i, .dia-faq-item[open] summary .dia-i { transform: rotate(90deg); }
.dia-faq-item p {
    margin: 0;
    padding: 0 24px 20px;
    color: var(--body);
    font-size: 15px;
}

/* --- Final CTA --- */
.dia-cta-section {
    background: var(--bg);
}
.dia-cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: clamp(40px, 6vw, 72px);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.dia-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 100% 0%, rgba(139, 92, 246, 0.4), transparent 70%),
        radial-gradient(ellipse 50% 80% at 0% 100%, rgba(99, 102, 241, 0.3), transparent 70%);
    pointer-events: none;
}
.dia-cta-card > * { position: relative; z-index: 1; }
.dia-cta-card h2 {
    color: #fff;
    margin-bottom: 14px;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
.dia-cta-card p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.125rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.dia-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* --- Footer --- */
.dia-footer {
    background: var(--footer-bg);
    color: #b0adc0;
    padding: 64px 0 0;
    margin-top: 0;
}
.dia-footer h3 {
    color: #fff;
    font-family: var(--font-display);
    margin-bottom: 18px;
    font-size: 1rem;
}
.dia-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 48px;
}
.dia-footer p { color: #9892ac; margin: 0; font-size: 14.5px; }

.dia-footer-contact { display: flex; flex-direction: column; gap: 12px; }
.dia-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14.5px;
    color: #b0adc0;
}
.dia-footer-contact i, .dia-footer-contact .dia-i {
    color: var(--accent-start);
    width: 18px;
    margin-top: 5px;
    text-align: center;
}
.dia-footer-contact a { color: #b0adc0; }
.dia-footer-contact a:hover { color: #fff; }

.dia-footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.dia-footer-col ul li a {
    color: #b0adc0;
    font-size: 14.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}
.dia-footer-col ul li a i, .dia-footer-col ul li a .dia-i { color: var(--accent-start); font-size: 10px; }
.dia-footer-col ul li a:hover { color: #fff; }

.dia-footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.dia-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #b0adc0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}
.dia-footer-social a:hover {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    transform: translateY(-3px);
}

.dia-footer-copyright {
    background: var(--footer-copy-bg);
    padding: 20px 0;
    color: #8b85a0;
    font-size: 13.5px;
}
.dia-footer-copyright-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.dia-footer-copyright-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dia-footer-copyright-brand img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
/* Version publiée : discrète, en monospace pour que le SHA se lise et se
   recopie sans ambiguïté (0/O, 1/l). Vide tant que js/version.js n'a pas
   renseigné les constantes : le :empty évite un cadre vide dans le pied de
   page. */
.dia-footer-version {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #6f6a85;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    white-space: nowrap;
}
.dia-footer-version:empty {
    display: none;
}
.dia-footer-copyright-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.dia-footer-copyright-menu a { color: #8b85a0; }
.dia-footer-copyright-menu a:hover { color: #fff; }

/* --- Scroll to top --- */
.dia-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    /* Idem : masque a l'oeil mais focusable sans cette ligne. */
    visibility: hidden;
    transition: all 0.3s ease, visibility 0s 0.3s;
    z-index: 999;
}
.dia-scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
}
.dia-scroll-top:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5); }

/* --- Reveal animations (intersection observer based) --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .dia-orb { animation: none; }
    .dia-pulse-dot { animation: none; }
    .dia-status-led { animation: none; }
    html { scroll-behavior: auto; }
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
    .dia-section { padding: 60px 0; }
    .dia-section-header { margin-bottom: 40px; }
    .dia-hero-card { transform: rotate(0); }
    .dia-hero-actions { flex-direction: column; align-items: stretch; }
    .dia-hero-actions .dia-btn { justify-content: center; }
}
