/* =======================================*/
/* ============ VARIABLES & SETUP ========*/
/* =======================================*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Roboto:wght@300;400;500&display=swap');

:root {
    /* Palette de couleurs - BLEU PRO */
    --primary: #3498db;
    /* Bleu clair dynamique */
    --primary-dark: #2980b9;
    /* Bleu profond (hover) */

    /* Couleurs neutres */
    --dark: #2c3e50;
    /* Bleu nuit (fonds pro) */
    --dark-light: #34495e;
    /* Bleu nuit clair (sidebar) */
    --light: #f4f6f9;
    /* Gris très clair (background site) */
    --grey-text: #666;
    /* Texte secondaire */
    --white: #ffffff;

    /* Variables de design */
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);

    /* Ombres colorées (adaptées au bleu) */
    --shadow-primary: 0 5px 15px rgba(52, 152, 219, 0.4);
    --shadow-primary-hover: 0 8px 20px rgba(52, 152, 219, 0.6);
    --focus-ring: 0 0 0 4px rgba(52, 152, 219, 0.1);

    --radius: 8px;
    /* Arrondi standard */
    --radius-btn: 50px;
    /* Arrondi boutons */
}

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

body {
    background-color: var(--light);
    color: #333;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.8rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Conteneur générique */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Conteneur pour le champ mot de passe et l'icône */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* On s'assure que le texte ne passe pas sous l'icône */
.password-wrapper input {
    padding-right: 40px !important;
}

/* Style de l'icône de l'œil */
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #888;
    z-index: 10;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 5px;
}

.toggle-password:hover {
    color: var(--primary);
}

/* =======================================*/
/* =============== NAVBAR ================*/
/* =======================================*/
nav {
    background: var(--dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: var(--white);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #ecf0f1;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Bouton Mon Compte dans le menu */
.btn-contact {
    background: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-btn);
    color: white !important;
    font-weight: 700 !important;
}

.btn-contact:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* =======================================*/
/* ================= HERO =================*/
/* =======================================*/
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)),
        url('https://images.unsplash.com/photo-1589939705384-5185137a7f0f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 2rem;
    margin-top: -1px;
}

.hero h1 {
    font-size: 3rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.4rem;
    color: #ecf0f1;
    margin-bottom: 40px;
    font-weight: 300;
}

.btn-main {
    background-color: var(--primary);
    color: white;
    padding: 15px 35px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border: none;
    cursor: pointer;
    display: inline-block;
    box-shadow: var(--shadow-primary);
}

.btn-main:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid var(--primary);
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* =======================================*/
/* ======= SECTIONS (Pourquoi Louer) =====*/
/* =======================================*/
.why-us-section {
    padding: 4rem 0;
    background-color: var(--white);
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.section-subtitle {
    margin-bottom: 50px;
    color: var(--grey-text);
    font-size: 1.1rem;
}

.benefits-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 10px;
}

.benefit-card {
    background: #edeff3;
    ;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 300px;
    max-width: 350px;
    text-align: center;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: var(--light);
}

.icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.benefit-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.benefit-card p {
    color: var(--grey-text);
}

/* =======================================*/
/* ============ CATALOGUE & CARDS ========*/
/* =======================================*/

.catalogue-section {
    position: relative;
    padding: 4rem 0;
    background: url('https://images.unsplash.com/photo-1626845447936-eb4f45fbbf69?q=80&w=1548&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.catalogue-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.70);
    z-index: 0;
}

.catalogue-section .container {
    position: relative;
    z-index: 1;
}

/* --- Filtres et Recherche --- */
.search-bar,
.catalogue-search {
    text-align: center;
    margin-bottom: 30px;
}

.search-bar input,
.catalogue-search input {
    width: 100%;
    max-width: 500px;
    padding: 15px 25px;
    border: 2px solid #ddd;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-bar input:focus,
.catalogue-search input:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.filters {
    text-align: center;
    margin-bottom: 40px;
}

.filters button {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    background: var(--white);
    border: 2px solid #ddd;
    border-radius: var(--radius-btn);
    font-weight: 600;
    color: #666;
    transition: 0.3s;
}

.filters button:hover,
.filters button.active-filter {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* --- Grille et Cartes --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card {
    background-color: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.product-card img {
    width: calc(100% - 20px);
    margin: 10px auto 0 auto;
    display: block;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    border: none !important;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.card-content .category {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 15px;
}

.price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-top: auto;
    margin-bottom: 15px;
}

.btn-reserver {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--dark);
    color: white;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 600;
    transition: 0.3s;
}

.btn-reserver:hover {
    background: var(--primary);
}

.photo-non-contractuelle {
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 0;
}

.categorie-titre {
    width: 100%;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2980b9;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.categorie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .categorie-grid {
        grid-template-columns: 1fr;
    }

    .categorie-titre {
        font-size: 1.2rem;
        margin-top: 2rem;
    }
}

/* =======================================*/
/* ============ FICHE PRODUIT ============*/
/* =======================================*/
.product-detail-container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--grey-text);
    font-weight: bold;
}

.back-link:hover {
    color: var(--primary);
}

.product-detail-wrapper {
    display: flex;
    gap: 40px;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    align-items: flex-start;
}

.detail-image {
    flex: 1;
    max-width: 50%;
}

.detail-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid #eee;
}

.detail-content {
    flex: 1;
}

.detail-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.detail-category {
    display: inline-block;
    background: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--grey-text);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.detail-description {
    font-size: 1.1rem;
    color: var(--grey-text);
    margin-bottom: 30px;
}

.detail-price-box {
    background: #eaf2f8;
    /* Fond bleuté très clair */
    padding: 20px;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    margin-bottom: 30px;
}

.detail-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.btn-large-reserver {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: var(--radius);
    width: 100%;
    text-align: center;
    transition: 0.3s;
}

.btn-large-reserver:hover {
    background: #219150;
}

.disabled-link {
    background-color: #ccc !important;
    pointer-events: none;
    cursor: not-allowed;
}

/* Bouton Notice PDF (Sous l'image) */
.btn-notice {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background-color: #e74c3c;
    /* Rouge */
    color: white;
    text-align: center;
    border-radius: var(--radius);
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-size: 1rem;
}

.btn-notice:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Calendrier Input */
.reservation-box {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: var(--radius);
}

.calendar-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    background: #fff url('https://cdn-icons-png.flaticon.com/512/2702/2702604.png') no-repeat right 10px center;
    background-size: 20px;
}

.calendar-input:focus {
    border-color: var(--primary);
    outline: none;
}

/* =======================================*/
/* ======== CONTACT & FORMULAIRES ========*/
/* =======================================*/
.page-header {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #ccc;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 20px;
}

.contact-info-box {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: fit-content;
}

.contact-info-box h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.contact-form-box {
    flex: 2;
    min-width: 300px;
}

.form-row {
    display: flex;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: var(--focus-ring);
}

/* =======================================*/
/* ============== ADMIN ZONE =============*/
/* =======================================*/
.admin-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    text-align: center;
}

.sidebar-menu {
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--dark-light);
    color: white;
    border-left-color: var(--primary);
}

/* =======================================*/
/* ============ PROMOTIONS CSS ===========*/
/* =======================================*/
:root {
    --promo-color: #e74c3c;
}

.promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--promo-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
}

.detail-promo-badge {
    background-color: var(--promo-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
    vertical-align: middle;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #27ae60;
}

input:focus+.slider {
    box-shadow: 0 0 1px #27ae60;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid var(--dark-light);
    background-color: #233240;
}

.sidebar-footer a {
    color: #e74c3c;
    font-weight: bold;
    display: block;
}

.sidebar-footer a:hover {
    color: #ff7675;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    height: 100%;
    background: var(--light);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-add {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background-color: #219150;
}

.content-panel {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: var(--light);
    color: var(--grey-text);
    font-weight: 600;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-ok {
    background: #e8f5e9;
    color: #27ae60;
}

.status-reserved {
    background: #ffebee;
    color: #c0392b;
}

.status-attente {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

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

.action-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.edit {
    color: #3498db;
}

.delete {
    color: #e74c3c;
}

.btn-mini {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s ease;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-accept {
    background-color: #27ae60;
}

.btn-accept:hover {
    background-color: #219150;
    transform: translateY(-2px);
}

.btn-refuse {
    background-color: #e74c3c;
}

.btn-refuse:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

/* Bouton Sauvegarder (Modal Admin) */
.btn-save {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background-color: #27ae60;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-save:hover {
    background-color: #219150;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-cancel {
    background-color: #e74c3c;
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-cancel:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.5);
}

.btn-confirm-delete {
    background-color: #c0392b;
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(192, 57, 43, 0.3);
}

.btn-confirm-delete:hover {
    background-color: #a93226;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.5);
}

.checkbox-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: var(--radius);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    user-select: none;
}

.checkbox-item:hover {
    border-color: var(--primary);
    background-color: #f0f8ff;
}

.checkbox-item:has(input:checked) {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.checkbox-item input {
    accent-color: var(--primary);
    cursor: pointer;
}

/* Calendrier export admin */
.admin-blue-theme .flatpickr-months {
    background: #2980b9 !important;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.admin-blue-theme .flatpickr-current-month .flatpickr-monthDropdown-months,
.admin-blue-theme .flatpickr-current-month input.cur-year {
    color: white !important;
    font-weight: bold;
}

.admin-blue-theme .flatpickr-monthDropdown-months:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Flèches de navigation */
.admin-blue-theme .flatpickr-prev-month svg,
.admin-blue-theme .flatpickr-next-month svg {
    fill: white !important;
}

/* Jours de la semaine */
.admin-blue-theme .flatpickr-weekdays {
    background: #2980b9 !important;
}

.admin-blue-theme span.flatpickr-weekday {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Le jour sélectionné (Rond Bleu) */
.admin-blue-theme .flatpickr-day.selected,
.admin-blue-theme .flatpickr-day.startRange,
.admin-blue-theme .flatpickr-day.endRange,
.admin-blue-theme .flatpickr-day.selected.inRange,
.admin-blue-theme .flatpickr-day.startRange.inRange,
.admin-blue-theme .flatpickr-day.endRange.inRange,
.admin-blue-theme .flatpickr-day.selected:focus,
.admin-blue-theme .flatpickr-day.startRange:focus,
.admin-blue-theme .flatpickr-day.endRange:focus,
.admin-blue-theme .flatpickr-day.selected:hover,
.admin-blue-theme .flatpickr-day.startRange:hover,
.admin-blue-theme .flatpickr-day.endRange:hover,
.admin-blue-theme .flatpickr-day.selected.prevMonthDay,
.admin-blue-theme .flatpickr-day.startRange.prevMonthDay,
.admin-blue-theme .flatpickr-day.endRange.prevMonthDay,
.admin-blue-theme .flatpickr-day.selected.nextMonthDay,
.admin-blue-theme .flatpickr-day.startRange.nextMonthDay,
.admin-blue-theme .flatpickr-day.endRange.nextMonthDay {
    background: #2980b9 !important;
    border-color: #2980b9 !important;
    color: white !important;
    font-weight: bold;
}

/* Effet au survol des jours normaux */
.admin-blue-theme .flatpickr-day:hover {
    background: #eaf2f8 !important;
    /* Bleu très pâle */
    border-color: #eaf2f8 !important;
}

/* Aujourd'hui (Petit trait en dessous) */
.admin-blue-theme .flatpickr-day.today {
    border-color: #2980b9 !important;
}

.admin-blue-theme .flatpickr-day.today:hover {
    background: #2980b9 !important;
    color: white !important;
}

.flatpickr-custom {
    background-color: #fff;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    padding: 10px 15px;
    color: #2c3e50;
    font-size: 0.95rem;
    width: 140px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.flatpickr-custom:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
    background-color: #fff;
}

.flatpickr-custom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23bdc3c7' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2.99.9-2.99 2L2 19c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    /* Icône à droite */
}


/* =======================================*/
/* ============ FOOTER & INFOS ===========*/
/* =======================================*/
.info-section {
    background-color: var(--white);
    padding: 3rem 0;
}

.horaires-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.horaires-text h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.horaires-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.horaires-table tr {
    border-bottom: 1px solid #eee;
}

.horaires-table td {
    padding: 12px 5px;
    color: #555;
}

.address-box {
    background: var(--light);
    padding: 20px;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
}

footer {
    background: var(--dark);
    color: #bdc3c7;
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.socials a {
    color: var(--primary);
    margin: 0 10px;
    font-size: 1.5rem;
}

.socials a:hover {
    color: white;
}

.admin-access a {
    font-size: 0.8rem;
    opacity: 0.3;
    color: white;
}

.admin-access a:hover {
    opacity: 1;
}

/* =======================================*/
/* ======== MODALES & CALENDRIER =========*/
/* =======================================*/
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    position: relative;
    box-shadow: var(--shadow-hover);
    animation: slideDown 0.3s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #333;
}

/* Modale spécifique pour le PDF (plus large) */
.pdf-modal-content {
    width: 90% !important;
    max-width: 1000px !important;
    height: 90vh !important;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
}

/* L'iframe qui contient le PDF */
.pdf-frame {
    flex-grow: 1;
    width: 100%;
    border: 1px solid #ddd;
    background: #f4f4f4;
    border-radius: 4px;
    margin-top: 10px;
}

/* Custom Modal Erreur */
.custom-modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.custom-modal-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon-warning {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Calendrier Flatpickr Custom */
.flatpickr-day.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.flatpickr-day:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white;
}

.flatpickr-day.disabled {
    background-color: #ffebee !important;
    color: #c0392b !important;
}


/* =======================================*/
/* ========= CARROUSEL PHOTO==============*/
/* =======================================*/

.carousel-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: var(--radius);
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.carousel-btn:hover {
    background-color: var(--primary);
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.admin-carousel {
    width: 80px;
    height: 80px;
}

/* ================= LIGHTBOX (ZOOM PHOTO) ================= */

/* Le bouton "Loupe" sur les produits */
.zoom-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    opacity: 0;
}

.carousel-container:hover .zoom-trigger {
    opacity: 1;
}

.zoom-trigger:hover {
    transform: scale(1.1);
    background-color: var(--primary);
    color: white;
}

#zoom-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.zoom-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.zoom-close:hover {
    color: var(--primary);
}

.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 20px;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
    border-radius: 5px;
}

.zoom-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.zoom-prev {
    left: 20px;
}

.zoom-next {
    right: 20px;
}

.zoom-counter {
    color: #ccc;
    margin-top: 10px;
    font-size: 1.1rem;
}

/* --- BURGER MENU navbar pour petits écrans --- */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

/* =======================================*/
/* =========== RESPONSIVE ================*/
/* =======================================*/
@media (max-width: 992px) {
    nav {
        padding: 1rem 1.5rem;
        flex-direction: row;
        justify-content: space-between;
    }

    .burger {
        display: block;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        top: 70px;
        height: calc(100vh - 70px);
        background-color: var(--dark);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* Pleine largeur sur mobile pour plus de facilité */
        max-width: 400px;
        /* Limite sur tablette */
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 999;
        padding-top: 50px;
        overflow-y: auto;
        /* Permet le scroll si le menu est trop long */
    }

    .nav-links li {
        margin-bottom: 25px;
        opacity: 0;
        transition: opacity 0.5s ease 0.2s;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        color: white;
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .nav-active li {
        opacity: 1;
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

@media (max-width: 768px) {

    /* --- GENERAL --- */
    .container {
        padding: 1rem;
        width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* --- HERO --- */
    .hero {
        height: auto;
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* --- FLEXBOX STACKING --- */
    .contact-wrapper,
    .horaires-content,
    .product-detail-wrapper,
    .admin-wrapper {
        flex-direction: column !important;
    }

    /* --- GRILLES --- */
    .benefits-grid,
    .product-grid,
    .categorie-grid {
        grid-template-columns: 1fr;
    }

    .search-bar input,
    .catalogue-search input {
        width: 100%;
    }

    .filters button {
        width: 100%;
        /* Boutons filtres pleine largeur */
        margin: 5px 0;
    }

    /* --- DETAILS PRODUIT --- */
    .detail-image {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .detail-content {
        padding: 0;
    }

    .map-container iframe {
        height: 300px;
    }

    /* --- ADMIN MOBILE --- */
    .sidebar {
        position: fixed;
        left: -260px;
        /* Caché par défaut */
        top: 0;
        height: 100vh;
        z-index: 1100;
        transition: 0.3s;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 15px;
        width: 100%;
        margin-left: 0;
    }

    /* Bouton toggle pour la sidebar admin */
    .admin-mobile-toggle {
        display: block !important;
        /* Sera caché en desktop */
        background: none;
        border: none;
        color: var(--dark);
        font-size: 1.8rem;
        cursor: pointer;
        margin-right: 15px;
    }

    .top-bar {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    #page-title {
        font-size: 1.5rem;
        flex: 1;
    }

    /* --- TABLE TABLEAUX -> CARTES MOBILE --- */
    .admin-table {
        display: block;
        border: none;
    }

    .admin-table thead {
        display: none;
        /* On cache l'entête classique */
    }

    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        margin-bottom: 20px;
        background: white;
        border-radius: var(--radius);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        /* Effet Carte */
        border: 1px solid #eee;
        overflow: hidden;
    }

    .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
        min-height: 40px;
    }

    .admin-table td:last-child {
        border-bottom: none;
        justify-content: center;
        /* Boutons centrés à la fin */
        padding: 15px;
        background: #f9f9f9;
        gap: 10px;
    }

    /* Le label (ex: "Prix :") via l'attribut data-label */
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #7f8c8d;
        text-transform: uppercase;
        font-size: 0.8rem;
        text-align: left;
        margin-right: 15px;
    }

    /* Cas particulier : Image produit en grand au dessus */
    .admin-table td[data-label="Image"] {
        display: block;
        text-align: center;
        padding: 0;
    }

    .admin-table td[data-label="Image"]::before {
        display: none;
    }

    /* Pas de label pour l'image */
    .admin-table td[data-label="Image"] .carousel-container {
        width: 100%;
        height: 200px;
    }

    .admin-table td[data-label="Image"] img {
        height: 200px;
        object-fit: contain;
    }

    /* --- CALENDRIER RESPONSIVE --- */
    .flatpickr-calendar {
        max-width: 100% !important;
        width: 320px !important;
        /* Force la largeur mobile standard */
        margin: 0 auto;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 20px !important;
        /* Reset position */
    }

    #admin-calendar-preview {
        padding: 10px;
        overflow: hidden;
    }

    .admin-calendar-display {
        display: none;
        /* On cache l'input text du calendrier inline */
    }

    /* MODALES */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
        max-height: 80vh;
    }
}

@media (min-width: 769px) {
    .admin-mobile-toggle {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .horaires-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .horaires-text,
    .map-container {
        flex: 1;
    }
}


/* =======================================*/
/* =========== MODAL SIGNATURE ===========*/
/* =======================================*/
#signatureModal {
    background-color: rgba(0, 0, 0, 0.9) !important;
    padding: 0 !important;
    display: none;
    align-items: center;
    justify-content: center;
}

#signatureModal .modal-content {
    background: white;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    padding: 10px !important;
}

#signatureModal h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

#signature-pad-container {
    flex-grow: 1;
    width: 100%;
    border: 2px dashed #ccc;
    position: relative;
    touch-action: none;
    /* Indispensable pour le touch */
    background: #f9f9f9;
}

#signature-pad {
    width: 100%;
    height: 100%;
    display: block;
}

#signatureModal .modal-actions {
    margin-top: 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

#signatureModal .btn-secondary,
#signatureModal .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* =======================================*/
/* =========== ERROR STYLING =============*/
/* =======================================*/

/* Style pour l'input en erreur */
.input-error {
    border-color: #e74c3c !important;
    background-color: #fdf2f2 !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Style pour le message d'erreur */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message i {
    margin-right: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================*/
/* =========== NEW ADMIN UI ==============*/
/* =======================================*/

.admin-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.perm-item:hover {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.perm-item:has(input:checked) {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #0d47a1;
    font-weight: 500;
}

.perm-item.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #eaeded;
}

.perm-item input {
    accent-color: #3498db;
    width: 18px;
    height: 18px;
}

.btn-save-custom {
    transition: all 0.3s;
}

.btn-save-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-cancel-ghost {
    transition: all 0.3s;
}

.btn-cancel-ghost:hover {
    background: #7f8c8d !important;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .admin-card {
        padding: 20px;
    }
}

/* =======================================*/
/* =========== RESPONSIVE TWEAKS =========*/
/* =======================================*/

.admin-resa-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 1200px) {
    .admin-resa-layout {
        flex-direction: column;
        gap: 20px;
    }

    .admin-resa-layout>div {
        width: 100%;
        max-width: 100% !important;
    }

    #admin-calendar-preview {
        order: -1;
        /* Show calendar above form on mobile/tablet if preferred, or remove this line to keep form first */
    }
}

/* Category Filter Buttons */
.promo-cat-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #555;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.promo-cat-btn:hover {
    background: #f1f2f6;
    border-color: #ccc;
}

.promo-cat-btn.active {
    background: var(--primary);
    /* Uses main theme color */
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: var(--primary);
    /* Uses main theme color */
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* =======================================*/
/* =========== PROMOTION RIBBON ==========*/
/* =======================================*/

/* Ensure the container clips the ribbon */
.carousel-container {
    padding: 0;
    /* Override existing padding if any to be tight */
    position: relative;
    overflow: hidden;
}

.promo-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    transform: rotate(45deg);
    background-color: #e74c3c;
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    text-align: center;
    width: 120px;
    pointer-events: none;
    /* Let clicks pass through to zoom/carousel */
}

/* Price Display */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-right: 5px;
    display: inline-block;
}

.new-price {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1em;
}