/* JM PLATFORM - PAGE D'ACCUEIL */

:root {
    --primary: #173b70;
    --secondary: #2563eb;
    --accent: #f59e0b;
    --dark: #172033;
    --light: #f5f8fc;
}

html {
    scroll-behavior: smooth;
}

body {
    display: block;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: var(--dark);
    overflow-x: hidden;
}

.container {
    width: min(1150px, 92%);
    margin: auto;
}

/* MENU */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 12px #00000012;
}

.navbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--primary);
    border-radius: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

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

.nav-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn {
    display: inline-block;
    width: auto;
    padding: 10px 16px;
    border: 1px solid var(--secondary);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    color: var(--secondary);
    background: white;
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 27px;
    cursor: pointer;
}

/* SLIDER */

.slider {
    height: 490px;
    position: relative;
    overflow: hidden;
    background: var(--primary);
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity .7s;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #10294ee8, #10294e55);
}

.slide-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
    color: white;
}

.slide-content span {
    color: #fbbf24;
    font-weight: 700;
    letter-spacing: 2px;
}

.slide-content h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.2;
    margin: 18px 0;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

.slider-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #ffffff80;
    cursor: pointer;
}

.slider-dot.active {
    width: 28px;
    background: white;
}

/* FORMATIONS */

.section {
    padding: 70px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 35px;
}

.section-heading h2 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 12px;
}

.section-heading p {
    max-width: 750px;
    margin: auto;
    color: #64748b;
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.formation-card {
    padding: 25px;
    background: white;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    box-shadow: 0 5px 20px #00000008;
}

.formation-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.formation-card p {
    color: #64748b;
    margin-bottom: 20px;
}

.empty-message {
    text-align: center;
    color: #64748b;
    grid-column: 1 / -1;
}

/* FOOTER */

.footer {
    background: #10294e;
    color: white;
    padding: 35px 0;
    text-align: center;
}

.footer p {
    color: #cbd5e1;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 12px;
    }
}

@media (max-width: 850px) {
    .navbar {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-actions {
        width: 100%;
    }

    .slider {
        height: 420px;
    }

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .slide-content p {
        font-size: 15px;
    }

    .section-heading h2 {
        font-size: 26px;
    }
}
