/* Import Google Fonts déjà dans HTML */

/* Variables pour cohérence */
:root {
    --primary-color: #8B4513; /* Marron terre */
    --secondary-color: #D2691E; /* Orange doré */
    --accent-color: #F4E4BC; /* Beige clair */
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f9f5f0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 88px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

main {
    padding-top: 88px;
}

input, textarea, select {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Header fixe */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(139, 69, 19, 0.95); /* Semi-transparent */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 0.4rem 1rem 0.4rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0;
    flex: 0 0 auto;
}

.nav-brand h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: white;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu .nav-action {
    margin-left: 0.5rem;
}

.admin-header-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

#panier-icon {
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
}

#panier-count {
    background: var(--secondary-color);
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    min-width: 1.5rem;
    text-align: center;
}

/* Hamburger pour mobile */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero section */
.hero {
    min-height: calc(100vh - 88px);
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://via.placeholder.com/1920x1080?text=Hero+Image+-+Vos+Bougies') center/cover; /* Remplacez par votre image */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding: 4rem 1rem;
    scroll-margin-top: 88px;
}

.hero-overlay {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 400;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hidden {
    display: none !important;
}

.admin-gallery-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-status {
    color: var(--text-light);
    font-size: 0.95rem;
}

.admin-login-card {
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(139,69,19,0.25);
    padding: 1.5rem;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.admin-login-card .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-login-card label {
    font-weight: 500;
    color: var(--primary-color);
}

.admin-login-card input {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    width: 100%;
}

.admin-login-card input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(210,105,30,0.12);
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-locked {
    background: rgba(255,255,255,0.95);
    border: 1px dashed var(--primary-color);
    color: var(--text-dark);
    padding: 1.5rem;
    border-radius: 18px;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Sections générales */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Grille produits */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.produit {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    min-height: 100%;
}

.produit:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.produit img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.produit:hover img {
    transform: scale(1.05);
}

.produit h3 {
    font-family: 'Playfair Display', serif;
    margin: 1rem 0;
    color: var(--primary-color);
}

.produit p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.produit .prix {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.produit button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.produit button:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.product-actions { display:flex; gap:0.5rem; justify-content:center; margin-top:auto; }
.product-actions .add-cart { background: var(--secondary-color); color: white; border-radius: 20px; padding: 0.6rem 1rem; border:none; }
.product-actions .edit-desc { background: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); padding: 0.5rem 0.8rem; border-radius: 20px; cursor:pointer; }
.desc-edit { width: 100%; padding: 0.6rem; border-radius: 8px; border:1px solid #ddd; resize:vertical; margin-top:0.5rem; }
.save-desc, .cancel-desc { padding: 0.5rem 0.8rem; border-radius: 20px; border:none; cursor:pointer; }
.save-desc { background: var(--secondary-color); color: white; }
.cancel-desc { background: #eee; color: #333; }


/* Style pour le bouton supprimer dans la galerie */
#delete-img { background: #c0392b; color: white; border: none; padding: 0.6rem 0.8rem; border-radius: 8px; cursor: pointer; }
#delete-img:hover { background: #a93226; }

.gallery-meta { display:flex; flex-direction:column; gap:0.5rem; margin-top:0.8rem; width:100%; max-width:600px; }
.gallery-meta input#gallery-title { padding:0.6rem; border-radius:8px; border:1px solid #ddd; }
.gallery-meta textarea#gallery-desc { padding:0.6rem; border-radius:8px; border:1px solid #ddd; resize:vertical; min-height:80px; }
.gallery-meta .meta-actions { display:flex; gap:0.5rem; justify-content:flex-end; }
.gallery-meta .btn { padding:0.5rem 0.8rem; border-radius:8px; }

/* À propos et contact */
.about-text {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
}

#contact p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

#contact a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Modal panier */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease-out;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-color);
}

.total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin: 1rem 0;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.modal-actions button {
    min-width: 140px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.produit:nth-child(1) { animation-delay: 0.1s; }
.produit:nth-child(2) { animation-delay: 0.2s; }
.produit:nth-child(3) { animation-delay: 0.3s; }
.produit:nth-child(4) { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        font-size: 0.95rem;
    }

    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .modal-content {
        margin: 8% 1rem;
        max-width: 95%;
        width: 100%;
        padding: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 80vh;
        padding: 2.5rem 1rem;
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .navbar {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .gallery img {
        height: 220px;
    }

    .produit img {
        height: 200px;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Styles pour la galerie */
.gallery-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.gallery {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.gallery img {
    width: 600px;
    max-width: 90vw;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.gal-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gallery-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.gallery-controls select {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

@media (max-width: 768px) {
    .gallery img { height: 260px; }
}