:root {
    --bg: #f5f7fc;
    --surface: #ffffff;
    --surface-2: #eef2ff;
    --text: #1e2b53;
    --text-soft: #53608a;

    /* Palette basee sur le logo */
    --blue-700: #32478f;
    --blue-600: #4962b6;
    --cyan-500: #57c1d8;
    --purple-500: #7e3ba8;
    --magenta-500: #bf3f9c;
    --orange-500: #f2a13f;

    --border: #dbe4ff;
    --shadow-soft: 0 10px 28px rgba(50, 71, 143, 0.12);
    --shadow-card: 0 8px 20px rgba(50, 71, 143, 0.08);

    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --max-w: 1160px;
}

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

html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Application sur tout le site */
body {
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at 10% 8%, rgba(87, 193, 216, 0.18), transparent 36%),
        radial-gradient(circle at 85% 12%, rgba(242, 161, 63, 0.16), transparent 34%),
        linear-gradient(180deg, #f9fbff 0%, #f3f6ff 100%);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    backdrop-filter: blur(10px);
    background: rgba(245, 247, 252, 0.92);
    border-bottom: 1px solid rgba(73, 98, 182, 0.18);
}

.logo {
    width: clamp(92px, 9vw, 130px);
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue-700);
    background: rgba(73, 98, 182, 0.12);
}

.btn-nav-cta {
    color: #ffffff !important;
    background: linear-gradient(120deg, var(--magenta-500), var(--purple-500));
    box-shadow: 0 8px 20px rgba(126, 59, 168, 0.28);
}

.btn-nav-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.hero {
    width: min(92%, var(--max-w));
    margin: 1.8rem auto;
    min-height: 62vh;
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4vw, 3.8rem);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
    display: grid;
    align-content: center;
    gap: 0.9rem;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        120deg,
        rgba(50, 71, 143, 0.82),
        rgba(87, 193, 216, 0.64),
        rgba(126, 59, 168, 0.5)
    );
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero h1 {
    max-width: 17ch;
    color: #ffffff;
    line-height: 1.12;
    font-size: clamp(2rem, 4.9vw, 3.25rem);
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(24, 34, 76, 0.35);
}

.hero p {
    max-width: 45ch;
    color: #f3f8ff;
    font-weight: 500;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero a {
    width: fit-content;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hero a:first-of-type {
    color: #fff;
    background: linear-gradient(120deg, var(--magenta-500), var(--purple-500));
}

.hero a:last-of-type {
    color: #1d2d64;
    background: linear-gradient(120deg, #ffffff, #eaf1ff);
}

.hero a:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.part {
    width: min(92%, var(--max-w));
    margin: 1.2rem auto 1.8rem;
    padding: clamp(1.4rem, 3vw, 2.1rem);
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid rgba(73, 98, 182, 0.12);
    box-shadow: var(--shadow-card);
}

.part h2 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 1rem;
    color: var(--blue-700);
}

.about-grid,
.text-grid {
    display: grid;
}

.text-grid {
    gap: 0.9rem;
    color: var(--text-soft);
    font-size: 1.05rem;
}

/* Carousel horizontal pour la section images */
.carousel-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.cards-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    flex: 1;
    padding: 0.2rem 0.1rem 0.8rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(73, 98, 182, 0.45) transparent;
}

.carousel-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, var(--blue-600), var(--purple-500));
    box-shadow: 0 8px 18px rgba(50, 71, 143, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.carousel-btn:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.06);
}

.carousel-btn:focus-visible {
    outline: 3px solid rgba(87, 193, 216, 0.5);
    outline-offset: 2px;
}

.cards-grid::-webkit-scrollbar {
    height: 9px;
}

.cards-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(120deg, var(--blue-600), var(--purple-500));
    border-radius: 999px;
}

.cards-grid::-webkit-scrollbar-track {
    background: rgba(73, 98, 182, 0.1);
    border-radius: 999px;
}

.card {
    flex: 0 0 clamp(250px, 32vw, 330px);
    scroll-snap-align: start;
    background: linear-gradient(160deg, #ffffff, var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(50, 71, 143, 0.15);
}

.image-card {
    border-radius: var(--radius-md);
    border: 1px dashed #bccaf3;
    background:
        linear-gradient(150deg, rgba(87, 193, 216, 0.12), rgba(191, 63, 156, 0.12)),
        #f7f9ff;
    min-height: 170px;
    overflow: hidden;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-icon {
    font-size: 1.45rem;
}

.card h3 {
    font-size: 1.03rem;
    color: var(--blue-700);
}

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

#contact {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    grid-template-rows: auto 1fr 1fr;
    grid-template-areas:
        "title title"
        "form right-top"
        "form right-bottom";
    gap: 1rem;
    align-items: start;
}

#contact h2 {
    grid-area: title;
}

.big-left-card {
    grid-area: form;
}

.small-right-upper-card {
    grid-area: right-top;
}

.small-right-lower-card {
    grid-area: right-bottom;
}

.big-left-card,
.small-right-upper-card,
.small-right-lower-card {
    background: linear-gradient(180deg, #ffffff, #f6f8ff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.05rem;
}

.section-subtitle {
    color: var(--text-soft);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.form-container {
    display: grid;
    gap: 0.75rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 0.92rem;
    border-radius: 10px;
    border: 1px solid #cad7fb;
    background: #fcfdff;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(73, 98, 182, 0.16);
}

button,
.btn {
    border: none;
    font: inherit;
}

.btn-primary {
    width: 100%;
    padding: 0.82rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(120deg, var(--orange-500), var(--magenta-500));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.small-right-upper-card,
.small-right-lower-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    align-items: stretch;
}

.small-right-upper-card h3,
.small-right-lower-card h3 {
    color: var(--blue-700);
    font-size: 1rem;
}

.small-right-upper-card a,
.small-right-lower-card a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--purple-500);
    font-weight: 700;
    word-break: break-word;
}

.small-right-upper-card a:hover,
.small-right-lower-card a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 980px) {
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.45rem 0.68rem;
    }

    #contact {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "title"
            "form"
            "right-top"
            "right-bottom";
    }

    .carousel-shell {
        gap: 0.45rem;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .card {
        flex-basis: clamp(240px, 70vw, 320px);
    }
}

@media (max-width: 660px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .logo {
        margin-inline: auto;
        width: clamp(100px, 40vw, 140px);
    }

    .nav-links {
        justify-content: center;
    }

    .hero {
        min-height: 58vh;
    }

    .hero h1 {
        max-width: 100%;
    }

    .hero a {
        width: 100%;
        text-align: center;
    }

    .carousel-shell {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: end;
    }

    .cards-grid {
        grid-column: 1 / -1;
    }

    .carousel-btn {
        position: static;
    }
}

.hero-legal {
    min-height: 35vh;
    padding: 120px 20px 60px;
}
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    line-height: 1.7;
}
.legal-block {
    margin-bottom: 2.5rem;
}
.legal-block h2 {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.legal-block ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}
.legal-block li {
    margin-bottom: 0.4rem;
}
.footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.idj-consent-box {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    padding: 20px 24px;
    z-index: 99999;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.idj-consent-box.is-visible {
    display: flex !important;
}
.idj-consent-text {
    flex: 1 1 420px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.idj-consent-text strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.idj-consent-text a {
    color: inherit;
    text-decoration: underline;
}
.idj-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.idj-consent-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #1f2937;
    transition: opacity 0.2s ease;
}
.idj-consent-btn:hover {
    opacity: 0.88;
}
.idj-consent-refuse {
    background: #ffffff;
    color: #1f2937;
}
.idj-consent-accept {
    background: #1f2937;
    color: #ffffff;
}
.form-consent-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    line-height: 1.45;
    display: none;
}
.form-consent-notice.is-pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.form-consent-notice.is-visible {
    display: block !important;
}
.form-consent-notice button {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    background: #1f2937;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}
#contact-form.is-locked input,
#contact-form.is-locked textarea,
#contact-form.is-locked button[type="submit"] {
    opacity: 0.55;
    cursor: not-allowed;
}