/* Variables CSS */
:root {
    --primary: #FF6B35;
    --secondary: #2C3E50;
    --concrete: #95A5A6;
    --light-gray: #ECF0F1;
    --dark-gray: #34495E;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.logo {
            font-size: 1.7rem;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }

        .logo-part1 {
            color: #fff; /* Bleu */
        }

        .logo-part2 {
           color: #ebdc0d; /* Rouge */
        }


/* Navigation */
.navbar {
    background: var(--secondary);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.nav-brand i {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-menu a {
    color: #5e5d5d;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    background-color: #ebdc0d;
    border-radius: 20px;
    padding: 6px 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: var(--transition);
}

/* Sidebar Mobile */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--secondary);
    color: var(--white);
    z-index: 2000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-sidebar:hover {
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-menu li a:hover {
    background: rgba(255, 107, 53, 0.2);
    color: var(--primary);
}

.sidebar-menu li a i {
    width: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    display: none;
    transition: var(--transition);
}

.overlay.active {
    display: block;
}

/* Hero Carrousel */
.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--concrete);
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(44, 62, 80, 0.9));
    color: var(--white);
    padding: 3rem 2rem;
}

.carousel-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-content p {
    font-size: 1.6rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(123, 105, 98, 0.17);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary);
}

/* Search Section */
.search-section {
    padding: 2rem 0;
    background: var(--light-gray);
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.search-select,
.search-box input {
    padding: 1rem;
    border: 2px solid var(--concrete);
    border-radius: 8px;
    font-size: 1rem;
}

.search-select {
    flex: 0 0 250px;
}

.search-box input {
    flex: 1;
}

#searchBtn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

#searchBtn:hover {
    background: #e55a2a;
}

.search-results {
    max-width: 800px;
    margin: 1rem auto 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    display: none;
}

.search-results.show {
    display: block;
}

.search-item {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

.search-item:hover {
    background: var(--light-gray);
}

.search-item a {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--secondary);
}

.search-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary);
}

/* Services Grid */
.services-grid {
    padding: 4rem 0;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px var(--shadow);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), #ff8a5c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.service-card p {
    color: var(--concrete);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
}


/* Products Section */
.products-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 1.2rem;
}

.product-info p {
    color: var(--concrete);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-col ul li i {
    color: var(--primary);
    margin-right: 8px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--dark-gray);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--concrete);
}

/* Product Detail Page */
.product-detail {
    padding: 3rem 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.main-image img,
.main-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
}

.thumbnail img,
.thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details h1 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-details .product-price {
    font-size: 2rem;
}

.product-details .product-category {
    position: static;
}

.product-description {
    color: var(--dark-gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #20BA5A;
    transform: scale(1.05);
}

.whatsapp-btn i {
    font-size: 1.5rem;
}

/* Subscription Form */
.subscription-section {
    padding: 3rem 0;
}

.subscription-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.calendar-widget {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h4 {
    color: var(--secondary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.calendar-day {
    padding: 0.8rem;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--primary);
    color: var(--white);
}

.calendar-day.selected {
    background: var(--primary);
    color: var(--white);
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Admin Panel */
.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ======== HEADER ADMIN ======== */
.admin-header {
  background: #1c1c1c;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  border-bottom: 5px solid #CCC5C2;
  flex-wrap: wrap; /* permet l'adaptation mobile */
  gap: 10px;
}

.admin-header h1 {
  font-size: 1.6rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header p {
  font-size: 0.95rem;
  color: #ccc;
  margin-top: 4px;
}

/* Bouton secondaire (déconnexion) */
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .admin-header h1 {
    font-size: 1.3rem;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
    font-size: 15px;
  }
}


.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-nav-btn {
    padding: 1rem 2rem;
    background: var(--light-gray);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.admin-nav-btn.active {
    background: var(--primary);
    color: var(--white);
}

.admin-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
}

.admin-tab {
    display: none;
}

.admin-tab:first-of-type {
    display: block;
}


/* ===== TABLEAU PRINCIPAL ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  table-layout: fixed;
}

/* ===== CELLULES ===== */
.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
  white-space: normal;  /* autorise le retour à la ligne */
  word-wrap: break-word; /* force le texte long à se couper proprement */
  overflow-wrap: anywhere; /* casse les mots très longs sans déborder */
  font-size: 0.95rem;
  word-break: break-word;
}


/* ===== EN-TÊTES ===== */
.data-table th {
  background: var(--secondary);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SURVOL DES LIGNES ===== */
.data-table tr:hover {
  background: rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease;
}

/* ===== RENDU MOBILE ===== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .data-table {
    font-size: 0.8rem;
    min-width: 800px; /* évite que la table se casse sur petits écrans */
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}

/* ===== OPTIONNEL: STYLE ZÉBRÉ ===== */
.data-table tr:nth-child(even) {
  background: #f9f9f9;
}


.action-btn {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit {
    background: #3498db;
    color: var(--white);
}

.btn-delete {
    background: #e74c3c;
    color: var(--white);
}

.action-btn:hover {
    opacity: 0.8;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary), var(--dark-gray));
}

.login-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

/* Correction pour les images produits */
.product-gallery .main-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--light-gray);
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumbnail.active {
    border-color: var(--primary);
}

.thumbnail img,
.thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback pour images manquantes */
img[src=""], img:not([src]) {
    opacity: 0;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-carousel {
        height: 450px;
    }
    
    .carousel-content h1 {
        font-size: 1.8rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-select {
        flex: 1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-nav {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) {
    .sidebar {
        display: none;
    }
}


/* Styles pour la page produit */
.product-detail {
    padding: 2rem 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.product-gallery {
    position: relative;
}

.main-media {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--light-gray);
    margin-bottom: 1rem;
}

.main-media img,
.main-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.thumbnail.active {
    border-color: var(--primary);
}

.thumbnail img,
.thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: background 0.3s;
}

.whatsapp-btn:hover {
    background: #128C7E;
}

.product-info-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.product-info-box ul {
    list-style: none;
    line-height: 2;
}

.product-info-box li i {
    color: var(--primary);
    margin-right: 10px;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .main-media {
        height: 300px;
    }
}