/**
 * Main styles for the JurisJs application
 */

:root {
    --black: #212121;
    --white: #ffffff;

    --accent-color: #8ab272;
    --accent-color-darker: #5a754a;
    --error-color: #8e1818;

    --section-min-height: 100vh;
    --section-min-height-dvh: 100dvh;
    --title_size: 6rem;



    @media screen and (max-width: 768px) {
        --section-min-height: 75vh;
        --section-min-height-dvh: 75dvh;
        --title_size: 4rem;
    }

    @media screen and (max-width: 400px) {
        --title_size: 3rem;
    }

    /* Font */
    --font: "Roboto", sans-serif;
    --title: "Corinthia", cursive;


    /* Box shadow */
    --box-shadow: 1.0px 2.0px 2.0px hsl(0deg 0% 0% / 0.12);
    --text-shadow: 4px 4px 4px rgba(33,33,33,0.7);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
    position: relative;
}

.app {
    position: relative
}

h1 {
    color: var(--black);
    font-size: 2.5rem;
}

/* Header styles */
.header-banner {
    background-color: #fff;
    padding: 1rem 0;
    min-height: var(--section-min-height);
    min-height: var(--section-min-height-dvh);
}

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-inline: 3rem;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    @media screen and (max-width: 768px) {
        padding-inline: 2rem;
    }
}

nav .logo {
    font-family: var(--title);
    font-size: 2rem;
    @media screen and (max-width: 400px) {
        font-size: 1.5rem;
    }
}

nav .rsvp-btn {
    border: 1px solid var(--black);
    padding: 0.5rem 1rem;
    color: var(--black);
    transition: all 0.3s ease-in-out;
    margin-block: 0.3rem;
    display: block;

    &:hover {
        background-color: var(--black);
        color: var(--white);
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

/* Language toggle button */
.lang-toggle-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    &:hover {
        background-color: var(--accent-color-darker);
    }
}

/* Main content */
.page-width {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.header-banner {
    min-height: var(--section-min-height);
    min-height: var(--section-min-height-dvh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--white);
    font-weight: 500;

    &:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 2;
    }

    h1 {
        font-size: 1.8rem;
        margin: 0;
        font-weight: 400;
        z-index: 3;
        color: var(--white);
        margin: 0;
        text-shadow: var(--text-shadow);

        @media screen and (max-width: 768px) {
            font-size: 1.4rem;
            text-align: center;
            padding-inline: 1rem;
        }
        
        @media screen and (max-width: 400px) {
            font-size: 1.3rem;
        }
    }

    .header-date {
        font-size: calc((14 - 1) * 1.2vw + 1rem);
        line-height: 0.7;
        font-family: var(--title);
        font-weight: bold;
        z-index: 3;
        margin: 0;
        text-shadow: var(--text-shadow);

        @media screen and (max-width: 768px) {
            font-size: calc((12 - 1) * 1.2vw + 1rem);
        }

        @media screen and (max-width: 400px) {
            font-size: calc((8 - 1) * 1.2vw + 1rem);
        }

        span {
            padding-inline: 2rem;
            display: inline-block;
            position: relative;

            @media screen and (max-width: 768px) {
                padding-inline: 1rem;
            }

            &:not(:last-child) {
                &::after {
                    content: " · ";
                    position: absolute;
                    right: 0;
                }
            }
        }
    }
    .header-location {
        font-size: 1.8rem;
        font-family: var(--title);
        z-index: 3;
        margin: 0;
        text-shadow: var(--text-shadow);
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        z-index: 1;
        position: absolute;
        filter: grayscale(100%);
    }
}

section {
    min-height: var(--section-min-height);
    min-height: var(--section-min-height-dvh);
}

section.programmation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 3rem;
    text-align: center;
    color: var(--black);
    justify-content: center;
    
    h2 {
        font-size: var(--title_size);
        max-width: 41rem;
        margin: 0 auto 1rem;
        font-family: var(--title);
        line-height: 0.7;
    }

    .programme {
        display: flex;
        gap: 2rem;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;

        .programme-item {
            padding-block: 2rem;
            width: 20%;
            max-width: 20%;

            @media screen and (max-width: 600px) {
                width: 33%;
                max-width: 33%;
                padding-block: 1rem;
            }

            h3 {
                font-size: 1.4rem;
                font-weight: 400;
                @media screen and (max-width: 768px) {
                    font-size: 1.2rem;
                }
            }

            p {
                font-size: 1.8rem;
                font-weight: bold;
                @media screen and (max-width: 768px) {
                    font-size: 1.6rem;
                }
            }
        }
    }
}

section.informations {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 3rem;
    padding-block: 2rem 4rem;
    text-align: center;
    color: var(--black);

    h2 {
        font-size: var(--title_size);
        max-width: 41rem;
        margin: 0 auto 3rem;
        font-family: var(--title);
        line-height: 0.7;
    }

    .informations-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 0;
        max-width: 1200px;
        margin: 0 auto;

        .information-item {
            position: relative;
            padding-bottom: 2rem;

            h3 {
                font-size: 1.4rem;
                font-weight: bold;
                line-height: 1;
                margin-bottom: 0.6rem;
            }

            p {
                font-size: 1.4rem;
                font-weight: 400;
                line-height: 1.2;

                &:not(:first-of-type) {
                    font-size: 1.2rem;
                    font-weight: 400;
                    margin-top: 1rem;
                    font-style: italic;
                }
            }
            svg {
                height: 100px;
                margin: 0 auto;
                display: block;
            }
        }
    }
}

/* Loading styles */
.loading-section {
    text-align: center;
    padding: 3rem 2rem;
    
    h2 {
        color: var(--accent-color);
        margin-bottom: 1rem;
    }
    
    p {
        color: var(--text-color);
        margin-bottom: 2rem;
    }
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button styles */
button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;

    &:hover {
        background-color: var(--accent-color-darker);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

.welcome {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding: 0 0 calc(100% * 495 / 2048) 0;
}

.welcome img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    display: block;

    filter: grayscale(100%);
    z-index: 1;
}

.welcome::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 60px;
    bottom: 0;
    left: 0;
    z-index: 2;
    background-color: rgba(255, 255, 255, 1);
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 25%, rgba(255, 255, 255, 0) 100%);
}

/* Page styles */

.inscription-page {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 2rem;

    .manager-lookup {
        min-height: calc(100vh - 51px);
        min-height: calc(100dvh - 51px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        h2 {
            font-size: 3rem;
            line-height: 1;
            margin-bottom: 20px;

            @media screen and (max-width: 768px) {
                font-size: 2rem;
            }
        }
    }
}
/* Form styles */
.inscription-form {
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--black);
    font-size: 1.3rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input:active,
.form-group select:active,
.form-group textarea:active {
    outline: none;
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(142,24,24,0.25);
}

.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(138,178,114,0.25);
}

.form-group select:has(option[value=""]:checked),
.form-group select:has(option[value="false"]:checked) {
    outline: none;
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(142,24,24,0.25);
}

.error-message {
    margin-top: 0.5rem;
    
    p {
        color: var(--error-color);
        font-size: 0.9rem;
        margin: 0;
        font-weight: 500;
    }
}

.submit-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 1rem;
}

.submit-btn:hover {
    background-color: var(--accent-color-darker);
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.secondary-btn:hover {
    background-color: #5a6268;
}

/* Family form specific styles */
.family-form {
    padding-top: 2rem;
}

.family-members {
    display: grid;
    gap: 1.5rem;
    margin-block: 2rem;
}

.member-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.member-card h3 {
    margin: 0 0 1rem 0;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    padding-block: 2rem;
    border-top: 1px solid #e9ecef;
}

/* Manager lookup specific styles */
.manager-lookup {
    text-align: center;
}

.manager-lookup .submit-btn {
    width: auto;
    min-width: 200px;
}

/* Export page styles */
.export-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.export-section {
    text-align: center;
    padding: 2rem;
}

.export-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--black);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    color: var(--accent-color);
}

.stat-number.confirmed {
    color: #28a745;
}

.stat-number.pending {
    color: #ffc107;
}

.meal-stats {
    margin: 3rem 0;
    text-align: left;
}

.meal-stats h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.meal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.meal-name {
    font-weight: 500;
}

.meal-count {
    font-weight: bold;
    color: var(--accent-color);
}

.export-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.export-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.export-btn:hover {
    background-color: var(--accent-color-darker);
}

.refresh-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background-color: #5a6268;
}

/* Navigation active state */
nav a.active {
    color: #007bff;
    font-weight: 600;
}