@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: #f4f6fb;
    color: #222;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5em 2em;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

header h1 {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2a4d8f;
}

header nav ul {
    display: flex;
    gap: 2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav a {
    text-decoration: none;
    color: #2a4d8f;
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

header nav a:hover,
header nav a:focus {
    background: #e3eafc;
    color: #17407b;
}

main {
    flex: 1;
    margin: 2em;
    padding: 2em;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(42, 77, 143, 0.07);
}

.main-content {
    display: flex;
    align-items: stretch;
    gap: 2em;
}

.main-image {
    flex: 0 0 50%;
    max-width: 50vw;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(42, 77, 143, 0.08);
}

.main-text {
    flex: 1 1 50%;
    max-width: 50vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1em;
    word-break: break-word;
    overflow-wrap: break-word;
}

.main-text h2 {
    margin-top: 0;
    color: #2a4d8f;
    font-size: 1.7em;
}

.main-text h3 {
    margin-bottom: 0.3em;
    color: #17407b;
    font-size: 1.2em;
}

.main-text h4 {
    margin-bottom: 0.7em;
    color: #4b5c7d;
    font-size: 1em;
    font-weight: 500;
}

.main-text p {
    color: #333;
    line-height: 1.6;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2em 0;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
}

footer nav ul {
    display: flex;
    gap: 2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

footer nav a {
    text-decoration: none;
    color: #2a4d8f;
    font-weight: 500;
    transition: color 0.2s;
}

footer nav a:hover,
footer nav a:focus {
    color: #17407b;
}

@media (max-width: 1300px) {
    main {
        margin: 1em;
        padding: 1em;
    }

    .main-content {
        flex-direction: column;
        gap: 1.5em;
    }

    .main-image,
    .main-text {
        max-width: 100vw;
        flex: 1 1 100%;
        padding-left: 0;
    }

    .main-image img {
        height: auto;
        min-height: 180px;
        max-height: 40vh;
    }

    header {
        flex-direction: column;
        align-items: stretch;
        padding: 1em;
        gap: 0.5em;
    }

    header h1 {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5em;
    }

    header nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    header nav ul {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1em;
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        list-style: none;
        text-align: center;
    }

    footer {
        padding: 1em 0.5em;
        font-size: 0.95em;
        flex-direction: column;
        gap: 0.5em;
    }

    footer nav ul {
        gap: 1em;
        flex-wrap: wrap;
    }
}

/* form */
form {
    display: flex;
    flex-direction: column;
    margin-top: 1.5em;
    gap: 1.8em;
}

form label {
    font-weight: 500;
    margin-bottom: 0.2em;
    color: #2a4d8f;
}

form input[type="text"],
form input[type="email"],
form input[type="date"],
form input[type="tel"] {
    padding: 0.6em 1em;
    border: 1px solid #c3d0e8;
    border-radius: 6px;
    font-size: 1em;
    background: #f7faff;
    transition: border 0.2s;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="date"]:focus,
form input[type="tel"]:focus {
    border: 1.5px solid #2a4d8f;
    outline: none;
    background: #fff;
}

form .toggle {
    display: flex;
    align-items: center;
}

form input[type="radio"] {
    accent-color: #2a4d8f;
    margin-right: 0.2em;
}

form button,
form input[type="submit"] {
    margin-top: 1em;
    padding: 0.7em 1.5em;
    background: #2a4d8f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

form button:hover,
form input[type="submit"]:hover {
    background: #17407b;
}

/* Responsive formulaire */
@media (max-width: 800px) {
    form {
        gap: 0.7em;
    }
}

.form-row {
    display: flex;
    gap: 1em;
}

.form-group {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.custom-alert {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    top: 2em;
    left: 50%;
    transform: translateX(-50%);
    background: #e6f7ef;
    color: #176c3a;
    padding: 1em 2em;
    border-radius: 10px;
    border: 1px solid #34c77b;
    box-shadow: 0 4px 24px rgba(52, 199, 123, 0.10);
    font-size: 1.1em;
    font-weight: 600;
    z-index: 9999;
    opacity: 0.98;
    min-width: 260px;
    max-width: 90vw;
    transition: opacity 0.3s;
    gap: 1em;
}

.custom-alert .custom-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    margin-right: 0.5em;
}

.unsubscribe-iframe {
    background: #fff;
    border-radius: 10px;
    margin-top: 1em;
    margin-bottom: 1em;
}

.toggle-info {
    font-size: 0.98em;
    color: #333;
    margin-top: 0.3em;
    line-height: 1.5;
}

.nav-mobile {
    display: none;
}

.nav-desktop {
    display: inline;
}

@media (max-width: 800px) {
    .nav-mobile {
        display: inline;
    }

    .nav-desktop {
        display: none;
    }
}