/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #ECFEFD;
    color: #161F27;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background-color: #ECFEFD;
    color: #161F27;
    padding: 2rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

h1 {
    font-family: 'Acme', sans-serif;
    font-size: 2rem;
    color: #161F27;
    font-weight: normal;
    letter-spacing: 0.5px;
}

h1 .highlight {
    color: #E2AE12;
}

/* Newsletter Selector Styles */
.newsletter-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    /*border: 1px solid rgba(226, 174, 18, 0.3);*/
    box-shadow: 0 2px 8px rgba(22, 31, 39, 0.08);
}

.newsletter-selector label {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: #161F27;
    font-weight: 400;
    white-space: nowrap;
}

select {
    font-family: 'Open Sans', sans-serif;
    padding: 0.75rem 1.25rem;
    border: 1px solid #E2AE12;
    border-radius: 8px;
    background-color: white;
    color: #161F27;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161F27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

select:hover {
    border-color: #f0c040;
    box-shadow: 0 4px 12px rgba(226, 174, 18, 0.2);
    transform: translateY(-1px);
}

select:focus {
    outline: none;
    border-color: #E2AE12;
    box-shadow: 0 0 0 4px rgba(226, 174, 18, 0.15);
    transform: translateY(-1px);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.newsletter-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(22, 31, 39, 0.12);
    overflow: hidden;
    /*border: 1px solid #161F27;*/
    position: relative;
}

/* Iframe Styles */
#newsletter-frame {
    width: 100%;
    min-height: 800px;
    height: calc(100vh - 240px);
    border: none;
    display: block;
    background-color: white;
}

/* Loading State */
.newsletter-container:empty::after {
    content: 'Chargement de la newsletter...';
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .header-content {
        align-items: center;
    }

    .logo-section {
        justify-content: center;
    }

    .newsletter-selector {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 400px;
    }

    .newsletter-selector label {
        text-align: center;
    }

    select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    main {
        padding: 1.5rem 1rem;
    }

    #newsletter-frame {
        min-height: 600px;
        height: calc(100vh - 280px);
    }

    .newsletter-container {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 0.75rem;
    }

    .logo {
        height: 55px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .newsletter-selector {
        padding: 0.75rem 1rem;
    }

    select {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        min-width: auto;
    }

    main {
        padding: 1rem 0.5rem;
    }
}
