/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Merriweather:wght@300;700&family=Lora:wght@400;700&display=swap');

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Times New Roman', sans-serif;
    text-align: center;
    background: #f8f8f8;
    overflow-x: hidden;
}

main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* Navigation */
nav {
    background: #f8f8f8;
    padding: 40px 20px 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-left {
    position: absolute;
    padding: 20px 0 0;
    left: 20px;
}

.logo-container {
    background-color: #222;
    border-radius: 50%;
    padding: 1px;
    display: inline-block;
}

.logo-container img {
    display: block;
    max-width: 100px;
    height: auto;
}

.nav-right {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.nav-right li a {
    color: #222;
    text-decoration: none;
    font-size: clamp(18px, 4vw, 25px);
}

/* Home Page Styles */
.chef-name {
    font-size: clamp(35px, 8vw, 55px);
    font-weight: bold;
    color: #222;
    margin-bottom: 30px;
    padding: 0 20px;
}

/* Header Images - Index Page */
.header-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chef-image {
    height: 40vh;
    margin-bottom: 0px;
}

.chef-image .background {
    background-image: url("../../images/backgrounds/image\ elle.webp");
}

.main-image {
    height: 60vh;
    margin-top: 20px;
    margin-bottom: 20px;
}

.main-image .background {
    background-image: url("../../images/backgrounds/photo\ elle\ sous\ texte.webp");
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

/* Content Styles */
.content {
    margin-top: -35px;
    padding: 20px;
    text-align: center;
}

.text-with-breaks {
    white-space: pre-line;
    line-height: 1.3;
    width: 90%;
    max-width: 800px;
    margin: auto;
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 3vw, 1.5rem);
    font-style: italic;
    color: #555;
    font-weight: 400;
}

.content h1 {
    color: #222;
    font-size: clamp(20px, 4vw, 25px);
}

.page-title {
    z-index: 2;
    text-align: center;
    font-size: clamp(24px, 5vw, 36px);
    margin: 0 0 20px;
    color: #222;
    padding: 0 20px;
}

/* Gallery Page Styles */
.gallery-page main {
    padding: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0;
}

.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: 1;
}

.image-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.02);
}

.caption {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.3;
}

.gallery-page footer {
    margin-top: 20px;
}

/* Contact Page */
.contact-page {
    position: relative;
}

.contact-page .header-image {
    height: 60vh;
}

.background-contact {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
    background-image: url("../../images/backgrounds/image\ équipe.jpg");
}

/* Form Styles */
#contact {
    margin-top: -10px;
    padding-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 700px;
    margin: 20px auto 30px;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    font-size: clamp(16px, 3vw, 18px);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Mobile-specific input styles */
@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 12px;
    }
    
    select {
        background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 30px;
    }
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

input[type="date"] {
    min-height: 44px;
}

.styled-date {
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
    cursor: pointer;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button[type="submit"] {
    background-color: #4a90e2;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

button[type="submit"]:hover {
    background-color: #357abd;
}

button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.form-status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Flatpickr customization */
.flatpickr-calendar {
    font-size: 16px;
}

.flatpickr-day {
    border-radius: 8px;
}

.flatpickr-day.selected {
    background: #4a90e2;
    border-color: #4a90e2;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 20px;
    background: #222;
    color: white;
    text-align: center;
}

footer img {
    max-width: 100%;
    height: auto;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 10px;
    }

    .nav-left {
        position: relative;
        left: 0;
        margin-bottom: 20px;
    }

    .nav-right {
        width: 100%;
        justify-content: space-around;
    }

    .chef-image {
        height: 25vh;
    }

    .main-image {
        height: 35vh;
    }

    .text-with-breaks {
        width: 95%;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
    }

    .content {
        margin-top: -35px;
        padding: 15px;
    }

    form {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .contact-page .header-image {
        height: 30vh;
    }

    .background-contact {
        height: 25vh;
    }

    #contact {
        margin-top: -20px;
    }
}

@media screen and (max-width: 480px) {
    .nav-right {
        gap: 15px;
        justify-content: center;
    }

    .chef-image {
        height: 30vh;
    }

    .main-image {
        height: 35vh;
    }

    form {
        width: 100%;
        padding: 15px;
        border-radius: 15px;
    }

    input, textarea, select {
        padding: 10px;
    }

    .contact-page .header-image {
        height: 25vh;
    }

    .background-contact {
        height: 20vh;
    }

    #contact {
        margin-top: -15px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Ensure images don't overflow their containers */
img {
    max-width: 100%;
    height: auto;
}

/* Cookie Banner Styles */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #222;
    color: white;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    flex: 1;
    min-width: 280px;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: white;
    color: #222;
}

.cookie-btn.reject {
    background: transparent;
    color: white;
    border: 1px solid white;
}

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

@media screen and (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}
