/* =====================================================================
 * FES COURSIER — Feuille de style principale
 * Site : https://fes-coursier.com
 * Palette : Orange #f5a623 / Gris #58595b / Fond clair #f8fafc
 * ===================================================================== */

/* =====================================================================
 * 1. RESET & VARIABLES
 * ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Couleurs principales (identiques au logo) */
    --orange:       #f5a623;
    --orange-dark:  #d98b0f;
    --orange-soft:  #fef3c7;

    --gris:         #58595b;
    --gris-dark:    #2d2e31;
    --gris-soft:    #e5e7eb;

    --bg:           #f8fafc;
    --white:        #ffffff;

    --text:         #1e293b;
    --text-muted:   #64748b;

    --blue:         #3b82f6;
    --blue-soft:    #dbeafe;

    --green:        #10b981;
    --green-soft:   #d1fae5;

    --red:          #ef4444;
    --red-soft:     #fee2e2;

    --yellow-soft:  #fef3c7;
    --yellow-txt:   #92400e;

    --dark-bg:      #1e293b;
    --dark-bg-2:    #0f172a;

    /* Ombres */
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
    --shadow:       0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:    0 12px 32px rgba(0,0,0,.12);

    /* Rayons */
    --radius:       10px;
    --radius-lg:    16px;
    --radius-full:  999px;

    /* Typo */
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Transitions */
    --transition: .2s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul { list-style: none; }

/* =====================================================================
 * 2. CONTAINER
 * ===================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-narrow { max-width: 820px; }

/* =====================================================================
 * 3. HEADER
 * ===================================================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 20px;
}

.logo img { height: 48px; width: auto; max-width: 200px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}
.nav-toggle:hover { background: var(--bg); }
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.main-nav a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}
.main-nav a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.main-nav a.active { color: var(--orange); }

.nav-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: var(--radius-full);
    font-size: 13px;
}
.nav-user small { color: var(--text-muted); margin-left: 2px; }

/* =====================================================================
 * 4. BOUTONS
 * ===================================================================== */
.btn-primary,
.btn-outline,
.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}
.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--gris-soft);
}
.btn-outline:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,.15);
    color: var(--white);
    border-color: var(--white);
}

.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-icon:hover {
    background: var(--orange-soft);
    color: var(--orange-dark);
}

/* =====================================================================
 * 5. SLIDESHOW HERO
 * ===================================================================== */
.hero-slider {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--gris-dark);
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide.active { opacity: 1; z-index: 1; }

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,.72), rgba(0,0,0,.45));
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    padding: 40px 20px;
    color: var(--white);
    animation: slideUp .9s ease;
}
.slide-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--orange);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.slide-content h1 {
    font-size: clamp(26px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}
.slide-content p {
    font-size: clamp(15px, 1.3vw, 17px);
    opacity: .95;
    margin-bottom: 32px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.slide-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: var(--white);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}
.slider-prev { left: 24px; }
.slider-next { right: 24px; }
.slider-prev:hover, .slider-next:hover { background: var(--orange); }

.slider-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    padding: 0;
}
.dot.active {
    background: var(--orange);
    width: 32px;
    border-radius: var(--radius-full);
}

/* =====================================================================
 * 6. BARRE DE SUIVI
 * ===================================================================== */
.tracking-bar {
    background: var(--orange-soft);
    padding: 26px 0;
    border-bottom: 1px solid #fde9b8;
}
.tracking-form {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}
.tracking-form label {
    font-weight: 700;
    font-size: 15px;
    color: var(--orange-dark);
}
.tracking-input-group {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 540px;
}
.tracking-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--white);
    border-radius: var(--radius);
    font-size: 15px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.tracking-input-group input:focus {
    outline: none;
    border-color: var(--orange);
}

/* =====================================================================
 * 7. BANDEAU CONFIANCE
 * ===================================================================== */
.trust-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gris-soft);
    padding: 24px 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-icon {
    font-size: 26px;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.trust-item strong { display: block; font-size: 14px; }
.trust-item span   { font-size: 13px; color: var(--text-muted); }

/* =====================================================================
 * 8. SECTIONS GÉNÉRIQUES
 * ===================================================================== */
.section { padding: 70px 0; }
.section-alt { background: var(--white); }

.section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}
.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
}
.section-head p { color: var(--text-muted); font-size: 16px; }

.kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--orange);
    margin-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--orange);
}
.section-title-orange { border-color: var(--orange); }
.section-title-green  { border-color: var(--green); }
.section-title-blue   { border-color: var(--blue); }
.section-title-red    { border-color: var(--red); }

.badge-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: var(--orange-soft);
    color: var(--orange-dark);
    font-size: 13px;
    font-weight: 700;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.muted       { color: var(--text-muted); }
.lead        { font-size: 17px; line-height: 1.7; margin-bottom: 18px; }

/* =====================================================================
 * 9. À PROPOS / DEUX COLONNES
 * ===================================================================== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}
.col-visual img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.check-list { margin: 20px 0; }
.check-list li {
    position: relative;
    padding: 8px 0 8px 34px;
    color: var(--text);
}
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* =====================================================================
 * 10. CARTES SERVICES
 * ===================================================================== */
.cards-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.service-card {
    background: var(--white);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--orange);
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.service-icon {
    font-size: 32px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p  { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.link-arrow { font-weight: 600; font-size: 14px; }

/* =====================================================================
 * 11. DÉTAIL SERVICES (page services.php)
 * ===================================================================== */
.service-detail {
    display: flex;
    gap: 28px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    align-items: flex-start;
}
.service-detail-icon {
    font-size: 38px;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.service-detail-body { flex: 1; }
.service-detail-body h2 { font-size: 22px; margin-bottom: 12px; }
.service-detail-body p  { color: var(--text-muted); margin-bottom: 16px; }

/* FAQ */
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 22px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    position: relative;
    transition: var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 10px;
    color: var(--orange);
    transition: transform var(--transition);
}
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item summary:hover { background: var(--bg); }
.faq-item p {
    padding: 0 22px 18px;
    color: var(--text-muted);
    font-size: 14.5px;
}

/* =====================================================================
 * 12. ÉTAPES
 * ===================================================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.step {
    text-align: center;
    padding: 32px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; font-size: 17px; }
.step p  { color: var(--text-muted); font-size: 14px; }

/* =====================================================================
 * 13. VILLES
 * ===================================================================== */
.villes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.ville-tag {
    padding: 8px 16px;
    background: var(--white);
    border: 2px solid var(--gris-soft);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.ville-tag:hover {
    border-color: var(--orange);
    color: var(--orange-dark);
}

/* =====================================================================
 * 14. PAGE HERO (services, suivi)
 * ===================================================================== */
.page-hero {
    background: linear-gradient(135deg, var(--gris-dark), var(--dark-bg));
    color: var(--white);
    padding: 70px 0;
    text-align: center;
}
.page-hero h1 {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.page-hero p {
    opacity: .9;
    max-width: 640px;
    margin: auto;
    font-size: 15.5px;
}
.page-hero .kicker { color: var(--orange); }

/* =====================================================================
 * 15. CONTACT + CARTE
 * ===================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}
.contact-info h2 { font-size: clamp(22px, 2.5vw, 30px); margin-bottom: 14px; }
.contact-info p  { color: var(--text-muted); margin-bottom: 20px; }

.contact-list { margin: 24px 0; }
.contact-list li {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    align-items: center;
}
.contact-icon {
    font-size: 22px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-list strong { display: block; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.contact-list a, .contact-list span { font-weight: 600; font-size: 15px; color: var(--text); }

.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 380px;
}
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* =====================================================================
 * 16. CTA FINAL
 * ===================================================================== */
.cta-section {
    background: linear-gradient(135deg, var(--gris-dark), var(--dark-bg-2));
    color: var(--white);
    padding: 60px 0;
}
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
.cta-inner p  { opacity: .9; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* =====================================================================
 * 17. AUTHENTIFICATION
 * ===================================================================== */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--orange-soft), #ffffff);
}
.auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    padding: 42px 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.auth-head {
    text-align: center;
    margin-bottom: 28px;
}
.auth-head img { margin: 0 auto 16px; max-height: 60px; }
.auth-head h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}
.auth-head p { color: var(--text-muted); font-size: 14px; }

.auth-foot {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.input-password { position: relative; }
.input-password input { padding-right: 48px; }
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.toggle-password:hover { background: var(--bg); }

/* =====================================================================
 * 18. ALERTES
 * ===================================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.alert-success {
    background: var(--green-soft);
    color: #065f46;
    border-color: var(--green);
}
.alert-error {
    background: var(--red-soft);
    color: #991b1b;
    border-color: var(--red);
}
.alert-info {
    background: var(--blue-soft);
    color: #1e40af;
    border-color: var(--blue);
}
.alert-warning {
    background: var(--yellow-soft);
    color: var(--yellow-txt);
    border-color: var(--orange);
}

/* =====================================================================
 * 19. FORMULAIRES
 * ===================================================================== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}
.form-group .muted,
.form-group small {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--gris-soft);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 14px;
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}
.form-group input:disabled,
.form-group select:disabled {
    background: var(--bg);
    cursor: not-allowed;
}
.form-group textarea { resize: vertical; min-height: 90px; }

.form-group .error,
span.error {
    display: block;
    color: var(--red);
    font-size: 12.5px;
    margin-top: 4px;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

/* Input suffix MAD */
.input-suffix {
    position: relative;
    display: flex;
    align-items: stretch;
}
.input-suffix input { padding-right: 60px; }
.input-suffix .suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    pointer-events: none;
}

/* Switches */
.form-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 18px 0;
    border-top: 1px solid var(--gris-soft);
    margin: 12px 0;
}
.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .slider {
    position: relative;
    width: 42px;
    height: 24px;
    background: var(--gris-soft);
    border-radius: var(--radius-full);
    transition: var(--transition);
    flex-shrink: 0;
}
.switch .slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--orange); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch-label { font-size: 13.5px; color: var(--text); }

/* Card form */
.card-form {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--gris-soft);
    margin-top: 12px;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--white);
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar input[type="date"] { min-width: 160px; }

/* Search bar */
.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 16px 0 24px;
}
.search-bar input[type="text"] {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid var(--gris-soft);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    min-width: 0;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--orange);
}
.search-bar-lg {
    max-width: 620px;
    margin: 0 auto 32px;
}
.search-bar-lg input { padding: 14px 18px; font-size: 16px; }

/* File input */
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px dashed var(--gris-soft);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}
.form-group input[type="file"]:hover {
    border-color: var(--orange);
    background: var(--orange-soft);
}

/* =====================================================================
 * 20. TABLEAUX
 * ===================================================================== */
.table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 14px;
}
.data-table thead { background: var(--bg); }
.data-table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--gris-soft);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gris-soft);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.data-table .muted { color: var(--text-muted); font-size: 13px; }

.inline-form,
.inline-select {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.inline-select select {
    padding: 6px 10px;
    border: 2px solid var(--gris-soft);
    border-radius: 8px;
    font-size: 13px;
    background: var(--white);
    cursor: pointer;
}
.inline-select select:focus { border-color: var(--orange); outline: none; }

/* =====================================================================
 * 21. BADGES
 * ===================================================================== */
.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-en_cours { background: var(--yellow-soft); color: var(--yellow-txt); }
.badge-livre    { background: var(--green-soft);  color: #065f46; }
.badge-reporte  { background: var(--blue-soft);   color: #1e40af; }
.badge-echec    { background: var(--red-soft);    color: #991b1b; }

/* =====================================================================
 * 22. TABS
 * ===================================================================== */
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 16px 0 20px;
    border-bottom: 2px solid var(--gris-soft);
    padding-bottom: 0;
}
.tab {
    padding: 10px 18px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    margin-bottom: -2px;
    white-space: nowrap;
}
.tab:hover { color: var(--orange); }
.tab.active {
    color: var(--orange);
    border-color: var(--orange);
}

/* =====================================================================
 * 23. STAT CARDS (dashboard)
 * ===================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stats-grid-sm { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--orange);
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--text);
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--orange-soft);
    opacity: .3;
    z-index: 0;
}
.stat-card > * { position: relative; z-index: 1; }

.stat-icon  { font-size: 24px; }
.stat-label { font-weight: 600; color: var(--text-muted); font-size: 13.5px; }
.stat-num   { font-size: 30px; font-weight: 800; color: var(--text); }

.stat-en-cours { border-color: var(--orange); }
.stat-reporte  { border-color: var(--blue); }
.stat-echec    { border-color: var(--red); }
.stat-livre    { border-color: var(--green); }

/* =====================================================================
 * 24. KPI CARDS
 * ===================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.kpi-grid-lg { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.kpi-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kpi-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    word-break: break-word;
}
.kpi-highlight {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: var(--white);
}
.kpi-highlight .kpi-label { color: rgba(255,255,255,.9); }
.kpi-highlight .kpi-value { color: var(--white); }

/* =====================================================================
 * 25. QUICK ACTIONS
 * ===================================================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0 32px;
}
.quick-link {
    padding: 14px 18px;
    background: var(--white);
    border: 2px solid var(--gris-soft);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
}
.quick-link:hover {
    border-color: var(--orange);
    background: var(--orange-soft);
    color: var(--orange-dark);
    transform: translateY(-2px);
}

/* =====================================================================
 * 26. INFO BOX
 * ===================================================================== */
.info-box {
    background: var(--bg);
    padding: 18px 22px;
    border-radius: var(--radius);
    border-left: 4px solid var(--blue);
    margin: 18px 0;
    font-size: 14px;
}
.info-box h3 { font-size: 15px; margin-bottom: 8px; }
.info-box ul { padding-left: 20px; list-style: disc; }
.info-box li { margin-bottom: 4px; }
.info-box code {
    background: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--orange-dark);
}
.info-highlight {
    background: var(--orange-soft);
    border-color: var(--orange);
    color: var(--yellow-txt);
}

/* =====================================================================
 * 27. COLLAPSE
 * ===================================================================== */
.collapse {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 16px 0 24px;
    overflow: hidden;
}
.collapse summary {
    padding: 16px 22px;
    cursor: pointer;
    font-weight: 700;
    color: var(--orange-dark);
    background: var(--orange-soft);
    user-select: none;
    transition: var(--transition);
    list-style: none;
    position: relative;
}
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 8px;
    font-size: 11px;
    transition: transform var(--transition);
}
.collapse[open] summary::before { transform: rotate(90deg); }
.collapse summary:hover { background: #fde9b8; }
.collapse > form,
.collapse > div { padding: 22px; }

/* =====================================================================
 * 28. PAGINATION
 * ===================================================================== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--gris-soft);
    transition: var(--transition);
}
.page-link:hover { border-color: var(--orange); color: var(--orange); }
.page-link.active {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

/* =====================================================================
 * 29. USER BADGE (dashboard livreur)
 * ===================================================================== */
.user-badge {
    padding: 12px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 4px solid var(--orange);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}
.user-badge strong { color: var(--orange-dark); }

/* =====================================================================
 * 30. PAGE HEAD
 * ===================================================================== */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-head h1 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    margin-bottom: 4px;
}
.page-head .muted { color: var(--text-muted); font-size: 14px; }
.page-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =====================================================================
 * 31. SUIVI COLIS
 * ===================================================================== */
.tracking-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-top: 24px;
}
.tracking-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gris-soft);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.tracking-head .muted { font-size: 12.5px; display: block; }
.tracking-head h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--gris-dark);
    letter-spacing: 1px;
}

.tracking-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 22px;
    background: var(--bg);
    border-radius: var(--radius);
    margin: 28px 0;
}
.tracking-info > div { display: flex; flex-direction: column; gap: 4px; }
.tracking-info .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

.tracking-subtitle {
    font-size: 15px;
    margin: 28px 0 14px;
    color: var(--gris-dark);
}

/* Stepper vertical */
.stepper {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 12px;
}
.step-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    position: relative;
    opacity: .45;
}
.step-item.done { opacity: 1; }
.step-item.done.success .step-dot { background: var(--green); color: var(--white); }
.step-item.done.failed  .step-dot { background: var(--red);   color: var(--white); }

.step-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gris-soft);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
    z-index: 2;
    position: relative;
}
.step-item.done:not(.success):not(.failed) .step-dot {
    background: var(--orange);
    color: var(--white);
}
.step-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 33px;
    top: 58px;
    bottom: -6px;
    width: 2px;
    background: var(--gris-soft);
    z-index: 1;
}
.step-item.done:not(:last-child)::before { background: var(--orange); }

.step-label { font-weight: 600; font-size: 14.5px; }
.step-date  { font-size: 12.5px; color: var(--text-muted); }

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 14px;
    border-left: 2px solid var(--gris-soft);
    margin-left: 8px;
}
.timeline li {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    font-size: 14px;
}
.timeline-dot {
    width: 10px;
    height: 10px;
    background: var(--orange);
    border-radius: 50%;
    position: absolute;
    left: -21px;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--orange);
}
.timeline .muted { font-size: 12.5px; }

/* =====================================================================
 * 32. FACTURE
 * ===================================================================== */
.invoice-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.invoice {
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
    padding: 44px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 3px solid var(--orange);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.invoice-brand {
    display: flex;
    gap: 16px;
    align-items: center;
}
.invoice-brand h1 { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.invoice-brand p { font-size: 13px; margin-bottom: 2px; }

.invoice-meta { text-align: right; }
.invoice-meta h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--orange);
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.invoice-meta p { font-size: 13.5px; margin-bottom: 3px; }

.invoice-info {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.invoice-info h3 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: .8px;
    margin-bottom: 8px;
}
.invoice-info p { font-size: 14px; margin-bottom: 2px; }

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 13.5px;
}
.invoice-table th {
    text-align: left;
    padding: 12px 12px;
    background: var(--gris-dark);
    color: var(--white);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}
.invoice-table th.text-right,
.invoice-table td.text-right { text-align: right; }
.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gris-soft);
    vertical-align: top;
}
.invoice-table tbody tr:hover { background: var(--bg); }

.invoice-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 0;
    border-top: 2px solid var(--gris-soft);
    margin-top: 12px;
}
.totals-row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    min-width: 320px;
    font-size: 14.5px;
    padding: 6px 0;
}
.totals-row.grand-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--orange-dark);
    padding-top: 14px;
    border-top: 2px dashed var(--gris-soft);
    margin-top: 6px;
}

.invoice-footer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--gris-soft);
    text-align: center;
    font-size: 13px;
}
.invoice-footer .small { font-size: 11.5px; opacity: .7; }

/* =====================================================================
 * 33. PAGE ERREUR
 * ===================================================================== */
.error-page {
    text-align: center;
    padding: 60px 20px;
}
.error-page h1 {
    font-size: 96px;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
    margin-bottom: 16px;
}
.error-page h2 { font-size: 26px; margin-bottom: 12px; }
.error-page p { margin-bottom: 24px; color: var(--text-muted); }
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================================
 * 34. WHATSAPP FLOTTANT
 * ===================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
    transition: var(--transition);
}
.whatsapp-float:hover {
    transform: scale(1.08);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(37, 211, 102, .6);
}

/* =====================================================================
 * 35. FOOTER
 * ===================================================================== */
.site-footer {
    background: var(--gris-dark);
    color: rgba(255,255,255,.85);
    padding: 56px 0 0;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
}
.footer-col h4 {
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--white);
    font-weight: 700;
}
.footer-col p,
.footer-col li {
    font-size: 14px;
    margin-bottom: 8px;
    color: rgba(255,255,255,.75);
    line-height: 1.7;
}
.footer-col a {
    color: rgba(255,255,255,.9);
    transition: var(--transition);
}
.footer-col a:hover { color: var(--orange); }
.footer-col img { margin-bottom: 12px; max-height: 52px; }

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}
.footer-socials a:hover {
    background: var(--orange);
    transform: translateY(-2px);
}

.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }

.footer-bottom {
    background: var(--dark-bg-2);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.6);
}
.footer-bottom p { margin-bottom: 4px; }
.footer-legal a { color: rgba(255,255,255,.8); }
.footer-legal a:hover { color: var(--orange); }

/* =====================================================================
 * 36. REVEAL ANIMATION
 * ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================================
 * 37. RESPONSIVE
 * ===================================================================== */

/* Tablette */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 28px; }
    .two-cols { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero-slider { height: 520px; }
    .slider-prev, .slider-next { width: 42px; height: 42px; font-size: 18px; }
    .slider-prev { left: 12px; }
    .slider-next { right: 12px; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
    body { font-size: 14.5px; }
    .section { padding: 48px 0; }

    /* Nav mobile */
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .main-nav.open { max-height: 720px; }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 20px;
        gap: 4px;
    }
    .main-nav a { padding: 12px 14px; }
    .nav-user { background: var(--orange-soft); justify-content: center; }

    .hero-slider { height: 460px; }
    .slide-content h1 { font-size: 24px; }
    .slide-content p  { font-size: 14px; }
    .slide-actions { flex-direction: column; align-items: stretch; }

    .form-row,
    .form-row-3 { grid-template-columns: 1fr; }

    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn-primary,
    .form-actions .btn-outline { width: 100%; }

    .invoice { padding: 24px 20px; }
    .invoice-head { flex-direction: column; align-items: flex-start; }
    .invoice-meta { text-align: left; }
    .invoice-info { flex-direction: column; }
    .totals-row { min-width: 100%; font-size: 13.5px; gap: 10px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .page-head { flex-direction: column; align-items: flex-start; }
    .page-head-actions { width: 100%; }
    .page-head-actions .btn-primary,
    .page-head-actions .btn-outline { flex: 1; }

    .cta-inner { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; width: 100%; }
    .cta-actions .btn-primary,
    .cta-actions .btn-outline-light { width: 100%; }

    .service-detail { flex-direction: column; padding: 24px 20px; }

    .card-form { padding: 20px; }

    .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .tab { white-space: nowrap; }

    .tracking-input-group { flex-direction: column; }

    .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; }
}

/* Très petit mobile */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .stat-num { font-size: 24px; }
    .kpi-value { font-size: 19px; }
    .slide-tag { font-size: 11px; padding: 5px 10px; }
    .slide-content h1 { font-size: 21px; }
    .error-page h1 { font-size: 68px; }
}

/* =====================================================================
 * 38. IMPRESSION (facture uniquement)
 * ===================================================================== */
@media print {
    body { background: #fff; color: #000; font-size: 12pt; }

    .site-header,
    .site-footer,
    .no-print,
    .invoice-actions,
    .alert,
    .whatsapp-float { display: none !important; }

    .section { padding: 0 !important; }
    .container { max-width: 100% !important; padding: 0 !important; }

    .invoice {
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
        background: #fff !important;
        border-radius: 0 !important;
    }

    .invoice-table th {
        background: #333 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .badge {
        border: 1px solid #999;
        background: #f5f5f5 !important;
        color: #000 !important;
    }

    .totals-row.grand-total { color: #000 !important; }

    @page { margin: 1.5cm; }
}