:root {
    --color-bg: #0f172a;
    --color-bg-light: #f5f7fb;
    --color-primary: #2563eb;
    --color-primary-soft: #dbeafe;
    --color-accent: #06b6d4;
    --color-text: #0f172a;
    --color-text-muted: #6b7280;
    --color-white: #ffffff;
    --radius-lg: 1.25rem;
    --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Layout utilitaires */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.bg-dark {
    background: radial-gradient(circle at top left, #1d4ed8, #020617);
    color: var(--color-white);
}

.text-light {
    color: var(--color-white);
}

.text-muted {
    color: #e5e7eb;
}

/* Header & nav */
.site-header {
    background-color: rgba(15, 23, 42, 0.96);
    color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 700;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.logo-img {
    height: 48px; /* taille visuelle */
    width: auto; /* respecte le ratio */
    object-fit: contain;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #cbd5f5;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover {
    background-color: rgba(148, 163, 184, 0.2);
}

.nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.4rem;
}

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    background: radial-gradient(circle at top left, #1d4ed8, #020617);
    color: var(--color-white);
}

.hero-small {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
    color: var(--color-white);
}

.hero-container {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-bottom: 1rem;
}

.hero .accent {
    font-size: 1.1rem;
    font-weight: 500;
    color: #bfdbfe;
}

.hero p {
    color: #e5e7eb;
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5f5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.15s, color 0.15s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: #e5e7eb;
    border-color: #93c5fd;
}

.btn-outline:hover {
    background-color: rgba(15, 23, 42, 0.7);
}

.btn-light {
    background-color: var(--color-white);
    color: var(--color-text);
    border-color: transparent;
}

.btn-light:hover {
    background-color: #e5e7eb;
}

/* Hero illustration */
.hero-illustration {
    display: flex;
    justify-content: flex-end;
}

.hero-card {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.hero-card h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.hero-card ul {
    list-style: none;
    margin-bottom: 0.75rem;
}

.hero-card li {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.hero-note {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Grids & cards */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    background-color: var(--color-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.bg-dark .card {
    background-color: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

.section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.75rem;
}

/* Specific blocks */
.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
    gap: 2rem;
    align-items: flex-start;
}

.training-summary h3 {
    margin-bottom: 0.75rem;
}

.training-summary ul {
    list-style: none;
}

.training-summary li::before {
    content: "• ";
    color: var(--color-accent);
}

/* Contact */
.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 0.4rem;
}

/* Training layout */
.training-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 3fr);
    gap: 2rem;
}

.toc {
    background-color: var(--color-bg-light);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    position: sticky;
    top: 5rem;
    align-self: flex-start;
}

.toc h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.toc ol {
    list-style: none;
    font-size: 0.9rem;
}

.toc li {
    margin-bottom: 0.4rem;
}

.toc a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.toc a:hover {
    color: var(--color-primary);
}

.training-content h2 {
    margin-bottom: 0.5rem;
}

.training-content section {
    margin-bottom: 1.75rem;
}

.note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Download page */
.download-card {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--color-primary-soft), #eff6ff);
    border: 1px solid #bfdbfe;
}

.version-info {
    margin-bottom: 1rem;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.version-table th,
.version-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.version-table thead {
    background-color: #eff6ff;
}

/* Features cards */
.feature-card ul {
    list-style: none;
}

.feature-card li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.feature-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* Footer */
.site-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 0;
    background-color: #f9fafb;
    font-size: 0.85rem;
    color: #6b7280;
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-links a {
    margin-left: 0.8rem;
    color: #6b7280;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-illustration {
        justify-content: flex-start;
    }

    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-2,
    .two-columns,
    .training-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .toc {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav {
        position: absolute;
        right: 1.25rem;
        top: 4rem;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.98);
        padding: 0.75rem;
        border-radius: 0.75rem;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
        display: none;
    }

    .nav.nav-open {
        display: flex;
    }

    .nav-toggle {
        display: inline-flex;
    }
}

/* Documentation / versions */
.doc-meta {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 0.9rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.6);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.badge-latest {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background-color: #22c55e;
    color: #022c22;
    font-size: 0.8rem;
    font-weight: 600;
}

.doc-meta-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.doc-version-label {
    color: #e5e7eb;
}

.doc-version-select-label {
    color: #e5e7eb;
}

.doc-version-select-label select {
    margin-left: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #93c5fd;
    background-color: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.85rem;
}

/* Blocs média (captures + vidéos) */
.media-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.media-block {
    border-radius: 0.9rem;
    padding: 0.9rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.media-block h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.media-block img {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    display: block;
    margin-bottom: 0.4rem;
}

.media-caption {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Encapsuler proprement les vidéos */
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #020617;
    border: 1px solid #e5e7eb;
}

.video-wrapper video,
.video-wrapper iframe {
    display: block;
    width: 100%;
    height: auto;
}

/* Adaptation responsive des médias */
@media (max-width: 900px) {
    .media-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
