:root {
    --primary-color: #2563eb;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --logo-color: #E1C4DD;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

/* ==========================================================================
   Header avec Image de Fond
   ========================================================================== */
.main-header {
    background-image: url('uploads/Header_studio/studio-vue-den-haut-768x493.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    width: 100%;
    min-height: auto;
    aspect-ratio: 768 / 493;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    padding-top: 70px;
    background-attachment: scroll;
}

@media (min-width: 768px) {
    .main-header {
        min-height: 85vh;
        aspect-ratio: auto;
        background-position: center center;
        background-attachment: fixed;
    }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo img {
    height: 40px;
    width: auto;
    display: block;
}

.navbar .logo-text {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--logo-color);
}

.navbar nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
}

.navbar nav a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Navigation Mobile
   ========================================================================== */
.burger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    padding: 0;
    z-index: 1002;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color, #1e293b);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

@media screen and (max-width: 768px) {
    .burger-menu {
        display: flex !important;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
        gap: 1.2rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        z-index: 1001;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        margin-left: 0 !important;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Section Portfolio & Grille de Cartes (2 colonnes mobile)
   ========================================================================== */
.container {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--light-color);
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

/* 4 colonnes sur grand écran */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.card-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.card-item:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.card-text {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    gap: 0.5rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* Tablette (2 colonnes) */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Smartphones : 2 Colonnes avec taille adaptée */
@media (max-width: 640px) {
    .container {
        padding: 2.5rem 1rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .card-img-wrapper {
        height: 130px;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-tag {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }

    .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }

    .card-text {
        font-size: 0.8rem;
        line-height: 1.35;
        margin-bottom: 0.75rem;
    }

    .card-link {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Formulaire, Messages & Footer
   ========================================================================== */
.form-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.messages-list {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.msg-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.status-msg {
    font-size: 0.875rem;
    text-align: center;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: #64748b;
}