@import url(https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap);

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --primary: #8db5fd;
    --primary-dark: #4477d1;
    --secondary: #f1f5f9;
    --accent: #4477d1;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.043), 0 2px 4px -2px rgba(0, 0, 0, 0.053);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)
}

body {
    font-family: "Jost", sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f4f6f9' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none
}

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgb(255 255 255 / .3);
    box-shadow: var(--shadow-md);
    z-index: 80;
    padding: 16px 32px
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%
}

.logo {
    height: 40px;
    width: auto
}

.navbar-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    transition: max-height 0.5s;
    overflow: hidden
}

.navbar-buttons .link {
    color: #8db5fd;
    text-decoration: none;
    margin-right: 10px;
    transition: all 0.3s ease-in-out;
    font-weight: 500
}

.navbar-buttons .link:hover {
    color: #4477d1
}

.navbar-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: .875rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: var(--shadow-md)
}

.navbar-btn.secondary {
    background: rgb(255 255 255 / .1);
    border: 2px solid var(--primary);
    color: var(--primary)
}

.navbar-btn.secondary:hover {
    background: var(--primary);
    color: #fff
}

.navbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-dark)
}

.navimg {
    width: 40px;
    margin-left: 10px
}

.navimg img {
    width: 100%;
    border-radius: 50%;
    border: 2px solid #8db5fd;
    transition: all 0.3s ease-in-out
}

.navimg img:hover {
    border: 2px solid #4477d1
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    margin-left: auto
}

.main-content {
    padding: 100px 24px 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1
}

.page-title {
    text-align: center;
    margin-bottom: 48px
}

.page-title h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 12px
}

.page-title p {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 400
}

.espaecesav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #eaeafd;
    border-radius: 50px;
    width: 100%;
    margin-bottom: 50px;
    padding: 25px 10px 50px 10px
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1000px;
    width: 100%
}

.sections-grid a {
    text-decoration: none
}

.section-block {
    background: rgb(255 255 255 / .95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgb(255 255 255 / .3);
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    text-align: center;
    position: relative;
    overflow: hidden
}

.section-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(68 120 209 / .1), transparent)
}

.section-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
    border-color: var(--primary)
}

.section-block.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff
}

.section-block.active .section-title,
.section-block.active .section-description {
    color: #fff
}

.section-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease
}

.section-block:hover .section-icon {
    transform: scale(1.1) rotate(5deg)
}

.section-block.active .section-icon {
    background: rgb(255 255 255 / .2)
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.section-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0 0 0 / .6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000
}

.modal-overlay.active {
    display: flex
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px 32px;
    max-width: 700px;
    width: 95%;
    box-shadow: 0 8px 24px rgb(0 0 0 / .3);
    position: relative;
    text-align: center
}

.modal-content h2 {
    margin-bottom: 10px
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #4477d1;
    cursor: pointer;
    transition: color 0.3s ease
}

.modal-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 10px 5px;
    border-radius: 12px
}

.tab-button {
    background: none;
    border: none;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 1rem;
    color: #b2bcc8;
    cursor: pointer;
    border-bottom: 3px solid #fff0;
    transition: color 0.3s ease, border-color 0.3s ease
}

.tab-button:hover,
.tab-button:focus {
    color: #4477d1;
    outline: none
}

.tab-button.active {
    color: #4477d1;
    border-bottom-color: #4477d1
}

.tab-panels {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.tab-panel {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px
}

.tab-panel.active {
    display: flex
}

.modal-link {
    flex: 1 1 120px;
    max-width: 140px;
    padding: 16px 12px;
    background: #8db5fd;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgb(68 120 209 / .4);
    transition: background-color 0.3s ease, transform 0.3s ease;
    user-select: none;
    text-align: center
}

.modal-link:hover,
.modal-link:focus {
    background: #4477d1;
    transform: translateY(-2px);
    outline: none
}

.download-area {
    max-width: 700px;
    width: 100%
}

.download-card {
    background: rgb(255 255 255 / .95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgb(255 255 255 / .3);
    overflow: hidden;
    position: relative
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden
}

.card-header img {
    width: 100px
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    position: relative;
    z-index: 1
}

.header-subtitle {
    color: rgb(255 255 255 / .9);
    font-size: 15px;
    font-weight: 400;
    position: relative;
    z-index: 1
}

.card-body {
    padding: 40px 32px
}

.form-section {
    margin-bottom: 32px
}

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.select-wrapper {
    position: relative
}

.select {
    width: 100%;
    padding: 16px 38px 16px 16px;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
    appearance: none;
    box-shadow: var(--shadow-sm);
    font-family: "Jost", sans-serif
}

.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgb(99 102 241 / .1);
    transform: translateY(-1px)
}

.select:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md)
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease
}

.select:focus+.select-icon {
    transform: translateY(-50%) rotate(180deg)
}

.download-section {
    text-align: center;
    margin-top: 40px
}

.download-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.un {
    background: linear-gradient(135deg, #77eb8c 0%, #04a421 100%);
    color: #fff;
    border: none;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.trois {
    background: linear-gradient(135deg, #fdd7e9 0%, #fd94c5 100%);
    color: #fff;
    border: none;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .2), transparent);
    transition: left 0.5s
}

.download-btn:hover::before {
    left: 100%
}

.download-btn:hover {
    transform: translateY(-2px)
}

.download-btn:active {
    transform: translateY(-1px)
}

.download-btn:disabled {
    background: #7394cd;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm)
}

.un:disabled {
    background: #509f5e;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm)
}

.trois:disabled {
    background: #f1a8ca;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm)
}

.download-btn:disabled::before {
    display: none
}

.download-icon {
    margin-right: 8px;
    transition: transform 0.2s ease
}

.download-btn:hover .download-icon {
    transform: translateY(2px)
}

.status-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: .875rem;
    display: none;
    animation: slideIn 0.3s ease-out
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
    display: none
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px
}

.selection-preview {
    background: var(--secondary);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    border: 1px solid var(--border);
    display: none
}

.selection-preview.show {
    display: block;
    animation: slideIn 0.3s ease-out
}

.preview-title {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: .875rem
}

.preview-label {
    color: var(--text-secondary);
    font-weight: 500
}

.preview-value {
    color: var(--text-primary);
    font-weight: 600
}

.knowledge-base {
    padding: 0 0px 64px 0;
    max-width: 1000px;
    margin: auto;
    text-align: center
}

.kb-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--text-primary)
}

.kb-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px
}

.kb-search input {
    width: 100%;
    max-width: 800px;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    transition: all 0.3s ease;
    font-family: "Jost", sans-serif
}

.kb-search input:focus {
    outline: none;
    border-color: #4478d1;
    box-shadow: 0 0 0 4px rgb(68 120 209 / .1)
}

.kb-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px
}

.kb-filter {
    padding: 10px 18px;
    background: #f1f1f1;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: "Jost", sans-serif
}

.kb-filter.active,
.kb-filter:hover {
    background: #4478d1;
    color: #fff
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px
}

.kb-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-align: left
}

.kb-card:hover {
    transform: translateY(-6px)
}

.kb-card img {
    width: 100%;
    height: auto;
    display: block
}

.kb-card-content {
    padding: 10px
}

.kb-card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px
}

.kb-card-content p {
    font-size: .9rem;
    color: #666;
}

.kb-card-content .temps {
    font-size: .9rem;
    color: #4477d1;
    padding: 2px 10px;
    background-color: #ebf8ff;
    border-radius: 25px;
    margin-top: 15px;
    width: fit-content;
    text-align: center;
}

.kb-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #8db4fd50;
    overflow: auto;
}

/* Contenu de la modale */
.kb-modal-content {
    position: relative;
    margin: 10% auto;
    width: 80%;
    max-width: 800px;
    height: fit-content;
    border: 2px solid #8db5fd;
    border-radius: 15px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 45px 20px 20px 20px;
    overflow: hidden;
}

/* Vidéo */
.kb-modal-content video {
    width: 100%;
    border-radius: 15px;
    display: block;
}

/* Croix de fermeture FIXÉE en haut à droite de l'écran */
.kb-close-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 32px;
    cursor: pointer;
    z-index: 1100;
    user-select: none;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

@media (max-width:1080px) {
    .menu-toggle {
        display: block
    }

    .navbar-buttons {
        flex-direction: column;
        max-height: 0;
        width: 100%;
        margin-top: 12px;
        padding-left: 0
    }

    .navbar-buttons.active {
        max-height: 500px
    }

    .navbar-btn,
    .navbar-buttons .link {
        width: 100%;
        justify-content: center;
        text-align: center;
        margin: 8px 0
    }
}

@media (max-width:768px) {
    .main-content {
        padding: 120px 24px 40px 24px
    }

    .page-title h1 {
        font-size: 2rem
    }

    .sections-grid {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .espaecesav {
        margin: 0 0 50px 0;
        border-radius: 25px
    }

    .section-block {
        padding: 24px
    }

    .card-body {
        padding: 32px 20px
    }

    .download-btn {
        width: 100%;
        padding: 20px
    }
}

@media (max-width:480px) {
    .main-content {
        padding: 130px 8px 40px 8px
    }
}