/* =========================
   Variables & reset
   ========================= */
   
 body {
    background: radial-gradient(circle at top, #e5f0ff 0, #f5f5f7 40%, #f5f5f7 100%);
}

:root {
    --bg-body: #f5f5f7;
    --bg-card: #ffffff;
    --bg-header: #0f172a;
    --bg-topbar: #111827;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --accent: #f97316;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-subtle: 0 4px 15px rgba(15, 23, 42, 0.06);
}

/* Reset de base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #e5f0ff 0, #f5f5f7 40%, #f5f5f7 100%);
    color: var(--text-main);
    line-height: 1.5;
}

/* Liens */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Conteneur global */
.container {
    width: min(1200px, 100% - 2rem);
    margin: 0 auto;
}

/* =========================
   Header & navigation
   ========================= */
.site-header {
    background: linear-gradient(135deg, var(--bg-header), #020617);
    color: #e5e7eb;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 40;
}

.top-bar {
    font-size: 0.85rem;
    text-align: center;
    padding: 0.35rem 0.75rem;
    background: var(--bg-topbar);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
    gap: 1.5rem;
    flex-wrap: nowrap;         /* EMPÊCHE LE RETOUR À LA LIGNE */
    white-space: nowrap;       /* EMPECHE LES LIENS DE SE COUPER */
}

/* Logo */
.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #60a5fa, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Liens nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.nav-links a,
.nav-dropdown-btn {
    color: #e5e7eb;
    padding: 0.4rem 0.2rem;
    border-radius: 999px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

.nav-links a::after,
.nav-dropdown-btn::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.1rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #f97316);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.18s ease-out;
}

.nav-links a:hover::after,
.nav-dropdown-btn:hover::after {
    transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 200px;
    background: #0b1120;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: var(--shadow-soft);
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-menu a {
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.nav-dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.2);
}

/* Actions nav (compte, panier) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.nav-link {
    color: #e5e7eb;
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
}

/* Boutons pill */
.btn-pill {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.4), rgba(15, 23, 42, 0.9));
    color: #e5e7eb;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-pill:hover {
    filter: brightness(1.05);
}

/* =========================
   Sections & titres
   ========================= */
.site-main {
    padding: 1.5rem 0 3rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* =========================
   Hero / promo
   ========================= */
.hero {
    margin-bottom: 2rem;
}

.hero-card {
    background: radial-gradient(circle at top left, #dbeafe, #fef3c7);
    border-radius: 24px;
    padding: 1.8rem 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.4);
    display: grid;
    gap: 0.6rem;
    max-width: 700px;
}

.hero-card h2 {
    font-size: 1.5rem;
    margin: 0;
}

.hero-card p {
    margin: 0;
    color: var(--text-muted);
}

/* Boutons */
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    border-color: var(--border-soft);
}

.btn-outline:hover {
    background: #f9fafb;
}

/* =========================
   Grille de produits
   ========================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(148, 163, 184, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border-color: rgba(37, 99, 235, 0.35);
}

.product-image-wrapper {
    display: block;
    padding: 0.8rem 0.8rem 0;
}

.product-image {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: radial-gradient(circle at top, #eff6ff, #ffffff);
    border-radius: 12px;
}

.product-info {
    padding: 0.7rem 0.8rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.product-ref {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-bottom {
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
}

/* =========================
   Filtre / barre d’options
   ========================= */
.filter-bar {
    margin: 1.2rem 0 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
}

.filter-bar-label {
    font-weight: 500;
    color: var(--text-muted);
}

.chip {
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.chip--active {
    border-color: rgba(37, 99, 235, 0.4);
    background: var(--primary-soft);
    color: var(--primary);
}

/* =========================
   Pagination
   ========================= */
.pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.pagination a,
.pagination span {
    min-width: 32px;
    height: 32px;
    padding: 0 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: #ffffff;
}

.pagination .is-active {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* =========================
   Footer
   ========================= */
.site-footer {
    border-top: 1px solid var(--border-soft);
    background: #020617;
    color: #e5e7eb;
    padding: 2rem 0 2.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    font-size: 0.9rem;
}

.site-footer h4,
.site-footer h5 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.site-footer a {
    display: block;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
    opacity: 0.9;
}

.site-footer a:hover {
    opacity: 1;
}

/* =========================
   Formulaire de contact
   ========================= */
.contact-section {
    margin-top: 2rem;
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.contact-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.form-field {
    margin-bottom: 0.7rem;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: #f9fafb;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
    background: #ffffff;
}

.form-actions {
    margin-top: 0.6rem;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    .main-nav {
        flex-wrap: wrap;
    }
    .nav-links {
        display: none; /* tu peux gérer un burger menu si tu veux plus tard */
    }
    .hero-card {
        padding: 1.2rem 1rem;
    }
    .contact-section {
        grid-template-columns: 1fr;
    }
}

/* Fenêtre de contact */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.contact-modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem;
  width: min(900px, 100% - 2rem);
  box-shadow: 0 20px 60px rgba(15,23,42,0.3);
  position: relative;
}
.contact-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}
.footer-link { text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

/* Badge du panier */
.badge-pill {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-left: 0.25rem;
  background: #ef4444;
  color: #fff;
}

.layout-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}
.sidebar-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 25px rgba(15,23,42,0.07);
  border: 1px solid rgba(148,163,184,0.3);
}
.sidebar-title {
  margin-top: 0;
  margin-bottom: 0.8rem;
  text-align: center;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li a {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.sidebar-list li a:hover {
  background: #f3f4f6;
}

/* Carousel simple (tu peux améliorer) */
.home-carousel {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(15,23,42,0.28);
}
.home-carousel img {
  display: block;
  width: 100%;
}
.carousel-inner {
  position: relative;
}
.carousel-item {
  display: none;
}
.carousel-item.active {
  display: block;
}
.carousel-caption {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: rgba(15,23,42,0.7);
  color: #f9fafb;
  max-width: 70%;
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .layout-two-columns {
    grid-template-columns: 1fr;
  }
  .carousel-caption {
    max-width: 100%;
    left: 0.8rem;
    right: 0.8rem;
  }
}

/* =========================
   Grille produits page d'accueil (index)
   ========================= */

/* Le conteneur qui a: row row-cols-2 row-cols-sm-3 row-cols-md-4 g-4 */
.row.row-cols-2.row-cols-sm-3.row-cols-md-4.g-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* mobile : 2 colonnes */
    column-gap: 1.5rem;
    row-gap: 2.5rem;
    margin: 0; /* on enlève le comportement "row" de Bootstrap */
    padding: 0;
}

/* Chaque .col devient juste un item de la grille */
.row.row-cols-2.row-cols-sm-3.row-cols-md-4.g-4 > .col {
    width: 100%;
}

/* À partir de ~petites tablettes : 3 colonnes */
@media (min-width: 576px) {
    .row.row-cols-2.row-cols-sm-3.row-cols-md-4.g-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* À partir de ~desktop : 4 colonnes */
@media (min-width: 992px) {
    .row.row-cols-2.row-cols-sm-3.row-cols-md-4.g-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* =========================
   Style des cartes produits façon boutique
   ========================= */

.card.produit-card {
    border: none;
    background: #ffffff;
    border-radius: 0;
    text-align: center;
    box-shadow: none;
}

.produit-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;            /* tu peux ajuster */
    margin-bottom: 0.75rem;
}

.img-produit {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card.produit-card .card-title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.badge-prix {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.9rem;
}

/* Lien "Afficher" plus discret */
.btn-lien-produit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.btn-lien-produit:hover {
    background: #f3f4f6;
}

/* =======================================
   SECTION PRODUITS STYLE LABOUTIQUEMALIK
   ======================================= */

.malik-products {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.malik-products-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Grille : comme sur la capture, produits bien espacés */
.malik-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* mobile */
    column-gap: 60px;
    row-gap: 40px;
}

/* ≥ 768px : 3 produits par ligne */
@media (min-width: 768px) {
    .malik-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ≥ 1200px : 4 produits par ligne (comme la capture) */
@media (min-width: 1200px) {
    .malik-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Chaque produit : aucun cadre, aucun fond, juste contenu centré */
.malik-item {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Bloc image large en haut – style laboutiquemalik */
.malik-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;          /* ← essaie 320, tu peux monter à 340–360 si tu veux encore plus grand */
    margin-bottom: 0.8rem;
}

.malik-image-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Nom du produit : uppercase, espacements comme sur ta capture */
.malik-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.4;
    margin: 0 0 0.4rem;
}

/* Prix, ou "À partir de", sous le nom */
.malik-price {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.malik-products {
    margin-top: 2rem;
    margin-bottom: 3rem;
    
    padding: 2rem 2rem;

    background: #ffffff;       /* FOND BLANC */
    border-radius: 20px;       /* coins arrondis comme boutiques */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* ombre légère */
}

.malik-grid {
    column-gap: 10px;
    row-gap: 5px;
}

.malik-products {
    width: 100%;
}


/* =========================
   Mega menu Téléphones
   ========================= */

/* Le dropdown "Téléphones" ne doit pas être limité à la largeur du bouton */
.nav-dropdown-mega {
    position: static; /* au lieu de relative, pour que le mega-menu puisse prendre toute la largeur */
}

/* Mega-menu plein écran */
.nav-mega {
    left: 0;
    right: 0;
    margin: 0 auto;
	top: 70%;
    max-width: 1200px;               /* largeur du bloc central */
    padding: 1.5rem 1.5rem 2rem;
    background: #ffffff;
    color: #111827;
    border-radius: 0 0 18px 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.17);

    display: none;                   /* caché par défaut */
    gap: 2rem;
}

/* On garde la logique : hover sur le parent ouvre le mega-menu */
.nav-dropdown-mega:hover .nav-mega {
    display: grid;
}

/* Trois colonnes (comme sur la capture Malik) */
.nav-mega {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Colonne du mega-menu */
.mega-col {
    font-size: 0.9rem;
}

/* Image en haut de chaque colonne */
.mega-image-link {
    display: block;
    margin-bottom: 0.9rem;
}

.mega-image-link img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Titre de section (SOINS CHEVEUX / COLORATION / COIFFANTS -> ici iPhone/Android/Accessoires) */
.mega-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
}

/* Liens de catégories */
.mega-col a {
    display: block;
    padding: 0.18rem 0;
    text-decoration: none;
    color: #111827;
}

.mega-col a:hover {
    text-decoration: underline;
}

/* Responsive : sous 900px, on empile les colonnes */
@media (max-width: 900px) {
    .nav-mega {
        grid-template-columns: 1fr;
    }
}

/* =========================
   PAGE ENCAISSEMENTS
   ========================= */

.encaissement-page {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.6rem 2rem;
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  margin-top: 1.5rem;
}

/* Alertes info / succès */
.enc-alert {
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.enc-alert-info {
  background: #e0f2fe;
  border: 1px solid #0ea5e9;
  color: #0f172a;
}

.enc-alert-success {
  background: #dcfce7;
  border: 1px solid #22c55e;
}

/* Toolbar bouton ajouter */
.enc-toolbar {
  margin-bottom: 1rem;
}

/* Barre de filtres */
.enc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.enc-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.enc-filter-label {
  font-weight: 500;
  color: #6b7280;
  font-size: 0.8rem;
}

.enc-input {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 0.3rem 0.7rem;
  font-size: 0.88rem;
  background: #f9fafb;
  outline: none;
}

.enc-input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  background: #ffffff;
}

.enc-reset-btn {
  margin-left: 0.4rem;
}

/* Totaux */
.enc-totaux {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.enc-total {
  font-weight: 700;
}

.enc-total-jour {
  color: #16a34a;
}

.enc-total-mois {
  color: #15803d;
}

/* Barre export */
.enc-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* Boutons XS */
.btn-xs {
  padding: 0.18rem 0.7rem;
  font-size: 0.78rem;
}

/* Tableau */
.enc-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.enc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.enc-table thead {
  background: #f9fafb;
}

.enc-table th,
.enc-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.enc-table tbody tr:hover {
  background: #f9fafb;
}

/* Cellule produit tronquée */
.enc-produit-cell {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges statut */
.enc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.enc-badge-success {
  background: #dcfce7;
  color: #166534;
}

.enc-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Actions */
.enc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.enc-inline-form {
  display: inline-block;
}

/* Forme du bouton danger si tu ne l'as pas déjà */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #dc2626;
  background: #ef4444;
  color: #ffffff;
  cursor: pointer;
}

.btn-danger:hover {
  filter: brightness(1.03);
}

/* Form vider base */
.enc-vider-base {
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .encaissement-page {
    padding: 1.1rem 1rem 1.5rem;
  }
}

/* =========================
   Modales (sans Bootstrap CSS)
   ========================= */

/* =========================
   MODALS : CENTRAGE GLOBAL
   ========================= */

/* Par défaut : modal invisible */
.modal {
  position: fixed;
  inset: 0;
  display: none;                 /* 👈 important */
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

/* Quand on ajoute .show en JS => il apparaît + overlay */
.modal.show {
  display: flex;
  background: rgba(15, 23, 42, 0.45);
}

/* Boîte interne */
.modal-dialog {
  margin: 0;
  max-width: 900px;
  width: 100%;
}

.modal-dialog.modal-lg,
.modal-dialog.modal-xl {
  max-width: 1000px;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 0.75rem 1rem;
}

.modal-body {
  padding: 0.8rem 1rem 1rem;
}

.btn-close {
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

/* ========== Modales : style général ========== */

/* =========================
   MODALS GLOBAL – VERSION FINALE
   ========================= */

/* Tout modal est invisible par défaut */
.modal {
  position: fixed;
  inset: 0;
  display: none !important;      /* 🔥 force l'invisibilité */
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
  background: transparent;       /* pas d'overlay tant qu'il n'est pas ouvert */
}

/* Quand on ajoute .show en JS → modal visible + overlay */
.modal.show {
  display: flex !important;      /* 🔥 visible uniquement avec .show */
  background: rgba(15, 23, 42, 0.45);
}

/* Boîte interne centrée et large */
.modal-dialog {
  margin: 0;
  max-width: 900px;
  width: 100%;
}

.modal-dialog.modal-lg,
.modal-dialog.modal-xl {
  max-width: 1000px;
}

/* Désactiver complètement l’overlay Bootstrap si encore présent */
.modal-backdrop {
  display: none !important;
  background: transparent !important;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.35);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 0.75rem 1rem;
}

.modal-body {
  padding: 0.8rem 1rem 1rem;
}

/* Couleurs d'entête comme avant, mais en propre */
.modal-header.bg-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

.modal-header.bg-warning {
  background: #f59e0b;
  color: #ffffff;
}

.modal-header.bg-danger {
  background: #dc2626;
  color: #ffffff;
}

/* Bouton de fermeture */
.btn-close {
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

/* ========== Inputs & switch dans les modals ========== */

.form-control {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0.45rem 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: #f9fafb;
  outline: none;
}

.form-control:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  background: #ffffff;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
}

/* ========== Boutons type Bootstrap dans les modals ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-success {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
}

.btn-secondary {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #111827;
}

.btn-secondary:hover {
  background: #d4d4d8;
}

/* Hauteur max pour tous les modals */
.modal-dialog {
  max-width: 600px;
  width: 100%;
  margin: 0 1rem;
  max-height: 90vh;              /* <= limite la hauteur max */
  display: flex;
}

/* Largeur spéciale pour le modal des dettes (modal-xl) */
.modal-dialog.modal-xl {
  max-width: 1100px;
}

/* Le contenu du modal occupe la hauteur dispo et devient scrollable à l'intérieur */
.modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;              /* <= ne dépasse pas l'écran */
}

.modal-header,
.modal-footer {
  padding: 0.75rem 1rem;
  flex-shrink: 0;                /* header & footer fixés */
}

.modal-body {
  padding: 0.8rem 1rem 1rem;
  flex: 1 1 auto;
  overflow-y: auto;              /* <= SCROLL interne */
}

.pagination {
    display: flex;
    gap: 6px;
}

.pagination li {
    list-style: none !important;
}

.pagination a {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 0.85rem;
}

.pagination li.is-active a {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 1400px) {
    .nav-links {
        gap: 0.6rem;
    }
    .nav-actions {
        gap: 0.4rem;
    }
    .nav-dropdown-btn,
    .nav-links a {
        font-size: 0.85rem;
    }
}

/* =========================
   PAGE COMMANDES
   ========================= */

.commandes-page {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.6rem 2rem;
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  margin-top: 1.5rem;
}

.cmd-toolbar {
  margin-bottom: 1rem;
}

.cmd-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.cmd-export-bar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 1rem;
}

/* Carte principale de la page réparations */
.reparations-page {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.6rem 2rem;
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  margin-top: 1.5rem;
}

/* Barre filtre statut */
.rep-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.rep-filter-label {
  font-weight: 500;
  color: #6b7280;
}

/* Badges statut */
.enc-badge-success-light {
  background: #dcfce7;
  color: #166534;
}

.enc-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.enc-badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Petit composant "alert" simple */
.alert-like {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

/* =============== MODALS FULL MODERN =============== */

/* Largeur augmentée des modaux */
.modal-dialog {
    max-width: 700px !important;
    width: 90%;
}

.modal-dialog.modal-lg {
    max-width: 850px !important;
}

/* Taille XXL pour le modal d’ajout/modification */
.modal-xl {
    max-width: 1000px !important;
}

/* Carte interne */
.modal-content {
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.28);
}

/* Header */
.modal-header {
    padding: 1.2rem 1.4rem;
}

.modal-body {
    padding: 1.4rem 1.9rem;
}

.modal-footer {
    padding: 1rem 1.6rem;
    background: #f8fafc;
}

/* Champ formulaire plus large et plus élégant */
.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d1d5db;
    background: #f8fafc;
}

.modal-body textarea {
    height: 120px;
    resize: vertical;
}

/* Espacement entre colonnes */
.modal-body .row .col-6,
.modal-body .row .col-md-6 {
    margin-bottom: 1rem;
}

/* =========================
   MODALS : CENTRAGE GLOBAL
   ========================= */

/* Le wrapper du modal occupe tout l'écran + flex */
.modal {
  position: fixed;
  inset: 0;                       /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;            /* centre verticalement */
  justify-content: center;        /* centre horizontalement */
  padding: 1.5rem;                /* un peu d'air autour */
  background: rgba(15, 23, 42, 0.45);  /* fond sombre */
  z-index: 50;
}

/* Le contenu interne ne doit plus avoir de marges Bootstrap */
.modal-dialog {
  margin: 0;                      /* plus de margin-left bizarre */
  max-width: 900px;               /* largeur max du formulaire */
  width: 100%;
}

/* Pour les gros formulaires (ajout / modification) */
.modal-dialog.modal-lg,
.modal-dialog.modal-xl {
  max-width: 1000px;
}

.modal-header {
  padding: 1.1rem 1.5rem;
}

.modal-body {
  padding: 1.4rem 1.8rem;
}

.modal-footer {
  padding: 1rem 1.6rem;
  background: #f9fafb;
}

/* --- Structure du modal moderne --- */
.custom-modal-dialog {
    max-width: 600px;
    margin: 40px auto;
}

.custom-modal-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: fadeIn .3s ease-out;
}

/* HEADER */
.custom-modal-header {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    padding: 18px 22px;
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bouton fermer blanc */
.btn-close-white {
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg fill='white' viewBox='0 0 16 16' ...") no-repeat center;
    background-size: 16px;
}

/* BODY avec scroll */
.custom-modal-body {
    padding: 20px 22px;
    max-height: 60vh;
}

.scrollable-modal {
    overflow-y: auto;
}

/* FOOTER */
.custom-modal-footer {
    padding: 16px 22px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
}

/* Label aligné à gauche */
.modal-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   MODAL NOUVELLE COMMANDE REPARATION
   ========================= */

.reparation-modal .modal-dialog {
  max-width: 720px;
  width: 100%;
}

.reparation-modal .modal-content {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.35);
}

/* Corps avec fond doux + scroll si besoin */
.rep-modal-body {
  background: #f3f4f6;
  padding: 20px 22px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Pied de modal */
.rep-modal-footer {
  background: #f9fafb;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
}

/* Grille de formulaire :
   - 2 colonnes sur desktop
   - 1 colonne sur mobile */
.rep-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 10px;
}

/* Champ pleine largeur (description panne) */
.rep-field-full {
  grid-column: 1 / -1;
}

/* Label propre, bien à gauche */
.rep-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

/* Style des inputs / selects / textarea */
.reparation-modal input,
.reparation-modal select,
.reparation-modal textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color 0.15s ease-out,
              box-shadow 0.15s ease-out,
              background 0.15s ease-out;
}

/* Focus moderne */
.reparation-modal input:focus,
.reparation-modal select:focus,
.reparation-modal textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  background: #f9fafb;
}

/* Textarea un peu plus haut */
.reparation-modal textarea {
  min-height: 110px;
  resize: vertical;
}

/* Adaptation mobile : 1 colonne */
@media (max-width: 768px) {
  .rep-form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Mega-menu "Services"
   ========================= */

.nav-mega.services-mega {
  min-width: 780px;                 /* largeur du mega-menu */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.8rem;
  row-gap: 1.2rem;
  padding: 1rem 1.5rem;
}

/* Chaque colonne */
.nav-mega.services-mega .mega-col {
  min-width: 0;
}

/* Image en haut de chaque colonne */
.nav-mega.services-mega .mega-image-link {
  display: block;
  margin-bottom: 0.6rem;
}

.nav-mega.services-mega .mega-image-link img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

/* Titre de colonne */
.nav-mega.services-mega .mega-title {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Liens interne au mega-menu */
.nav-mega.services-mega a {
  display: block;
  font-size: 0.9rem;
  padding: 0.2rem 0;
}

/* =========================
   Formulaire : Ajout produit stock
   ========================= */

.product-form-wrapper {
  max-width: 980px;
  margin: 2.5rem auto 3rem;
}

.product-form-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.product-form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #2563eb;
  color: #fff;
}

/* Carte du formulaire */
.product-form-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.8rem 2rem 1.5rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Grille 2 colonnes (auto-adaptative) */
.product-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 1.5rem;
}

/* Un champ */
.product-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Label */
.product-form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

/* Inputs / selects / textarea du formulaire d’admin */
.product-form-field input[type="text"],
.product-form-field input[type="number"],
.product-form-field input[type="file"],
.product-form-field input[type="email"],
.product-form-field input[type="url"],
.product-form-field select,
.product-form-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background: #f9fafb;
}

.product-form-field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Focus */
.product-form-field input:focus,
.product-form-field select:focus,
.product-form-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  background: #ffffff;
}

/* Aide + erreurs */
.product-form-field .help-text {
  font-size: 0.8rem;
  color: #6b7280;
}

.product-form-field .field-error {
  font-size: 0.8rem;
  color: #b91c1c;
}

/* Zone des boutons */
.product-form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Boutons (réutilisent ton style global si tu en as) */
.product-form-actions .btn-primary {
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.product-form-actions .btn-primary:hover {
  filter: brightness(1.05);
}

.product-form-actions .btn-outline {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #111827;
}

.product-form-actions .btn-outline:hover {
  background: #f3f4f6;
}

/* Responsive : une seule colonne sur petit écran */
@media (max-width: 680px) {
  .product-form-card {
    padding: 1.4rem 1.2rem;
  }
}
/* =========================
   Modal "Ajouter produit stock"
   ========================= */

.stock-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.stock-modal-overlay.is-open {
  display: flex;
}

.stock-modal {
  width: min(960px, 100% - 2rem);
  max-height: calc(100% - 3rem);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stock-modal-header {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stock-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.stock-modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #e5e7eb;
}

.stock-modal-close:hover {
  color: #ffffff;
}

.stock-modal-body {
  padding: 1.2rem 1.5rem;
  flex: 1;
  overflow-y: auto;
  background: #f9fafb;
}

.stock-modal-loading {
  text-align: center;
  padding: 2rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* styliser un peu le formulaire dans le modal */
.stock-modal-form {
  max-width: 760px;
  margin: 0 auto;
}

.stock-modal-form p {
  margin-bottom: 0.7rem;
}

.stock-modal-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.stock-modal-form input,
.stock-modal-form select,
.stock-modal-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

/* Empêcher la page derrière de scroller */
body.modal-open-stock {
  overflow: hidden;
}

.stock-form-grid {
  max-width: 950px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 1.7rem 1.3rem;
  box-shadow: 0 18px 45px rgba(15,23,42,0.15);
}

.stock-form-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.stock-form-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.pill-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stock-form-grid-inner {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 1.2rem;
}

.stock-form-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sf-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.sf-field input[type="text"],
.sf-field input[type="number"],
.sf-field select,
.sf-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
  background: #f9fafb;
}

.sf-field textarea {
  min-height: 80px;
}

.sf-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.sf-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.stock-form-footer {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* buttons déjà alignés avec ton style global */
