/* ============================================================
   THEME ALITEL — look alitelflach.com pour le script GSM
   Fichier de theme versionne : jamais de champ de code geant.
   Couleurs : fond bleu nuit, boutons dores, cartes #0d2440,
   prix en pastille vert clair, barres de delai vert/orange/rouge.
   Aucune dependance JS. Animations par transform uniquement.
   ============================================================ */

:root {
    --af-bg1: #061224;
    --af-bg2: #0a1931;
    --af-bg3: #0d2b52;
    --af-card: #0d2440;
    --af-card-border: #1e3a5f;
    --af-title: #ffffff;
    --af-text: #dbe6f5;
    --af-muted: #9db1cc;
    --af-gold: #d4af37;
    --af-gold-bright: #ffd700;
    --af-gold-dark: #a8842a;
    --af-green: #00c853;
    --af-price-bg: #d8f3dc;
    --af-price-text: #1b7a3d;
    --af-orange: #f59e0b;
    --af-orange-dark: #ea580c;
    --af-red: #dc2626;
    --af-cyan: #29b6f6;
    --af-pink: #ff4da6;
    --af-radius: 16px;
}

/* ---------- Page ---------- */
.af-body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--af-text);
    background: linear-gradient(180deg, var(--af-bg1) 0%, var(--af-bg2) 45%, var(--af-bg3) 100%);
    background-attachment: fixed;
}

.af-body a { color: inherit; }

/* ---------- Utilitaires Tailwind absents du build Vite ---------- */
/* Le build Vite (public/build/assets/app-*.css, 2026-11-20 00:31) n'a
   jamais été reconstruit depuis : les utilitaires ajoutés aux vues
   après ne sont pas compilés. 15 vues utilisent overflow-x-auto pour
   leurs tableaux, 22 utilisent min-w-full — sans effet tant que ces
   règles manquent : le tableau déborde de sa carte et c'est TOUTE la
   page admin qui défile horizontalement (tableau coupé, barre latérale
   qui disparaît, bande claire — bug signalé par Badra le 2026-11-21).
   Ces deux règles rendent aux classes leur effet, sans reconstruction. */
.overflow-x-auto { overflow-x: auto; }
.min-w-full { min-width: 100%; }

/* ---------- Fond sombre TOTAL de l'admin ---------- */
/* Les pages admin (layout app) n'ont pas la classe .af-body sur <body>
   (réservée à la boutique) : le fond de page y est celui du navigateur
   (blanc). Le dégradé sombre vient de .af-app, large comme la fenêtre :
   dès que la page défile horizontalement, la zone révélée est blanche.
   body.af-admin-body (posé par app.blade.php sur les pages admin)
   donne au <body> le même dégradé sombre, en couleurs fixes (donc
   sombre aussi en thème clair) : plus aucune zone claire dans l'admin,
   même en défilant. */
body.af-admin-body {
    background: linear-gradient(180deg, #061224 0%, #0a1931 45%, #0d2b52 100%);
    background-attachment: fixed;
}
.af-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Page des résultats plein écran : le contenu occupe toute la largeur,
   pas de conteneur étroit. Sur écran large, 4 cartes par ligne. */
.af-wrap-full { max-width: none; }
@media (min-width: 1200px) {
    .af-wrap-full .af-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Petite flèche retour, en haut à gauche de la page des résultats. */
.af-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-top: 18px;
    border-radius: 999px;
    border: 1px solid var(--af-card-border);
    background: rgba(13, 36, 64, 0.85);
    color: var(--af-title);
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
}
.af-back + .af-section-title { margin-top: 12px; }

/* ---------- En-tete ---------- */
.af-header {
    background: rgba(6, 18, 36, 0.72);
    border-bottom: 1px solid var(--af-card-border);
    position: sticky;
    top: 0;
    /* z-index 95 : au-dessus de l'overlay du tiroir (90) pour que
       l'en-tête — logo, boutons, hamburger — reste cliquable quand
       le tiroir est ouvert ; en dessous du tiroir lui-même (100). */
    z-index: 95;
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
}
.af-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.af-logo {
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    background: linear-gradient(90deg, var(--af-cyan) 0%, #7ec8f7 45%, var(--af-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}
.af-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.af-nav-link {
    color: var(--af-text);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
}
.af-nav-link:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Boutons ---------- */
.af-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.af-btn:active { transform: scale(0.96); }
.af-btn-gold {
    background: linear-gradient(180deg, #f0cd6b 0%, var(--af-gold) 55%, #b8912f 100%);
    color: #231a02;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}
.af-btn-gold:hover { filter: brightness(1.08); }
.af-btn-ghost {
    background: transparent;
    color: var(--af-gold);
    border: 1.5px solid var(--af-gold);
}
.af-btn-ghost:hover { background: rgba(212, 175, 55, 0.12); }
.af-btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Banniere ---------- */
.af-banner {
    text-align: center;
    padding: 44px 16px 30px;
}
.af-banner-title {
    margin: 0;
    font-size: clamp(26px, 4.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--af-title);
}
.af-banner-gold { color: var(--af-gold); }
.af-banner-sub {
    margin: 12px auto 0;
    max-width: 560px;
    color: var(--af-muted);
    font-size: 15px;
    line-height: 1.6;
}
.af-banner-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.af-float-row {
    margin: 28px auto 0;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.af-float-card {
    background: linear-gradient(160deg, rgba(28, 58, 102, 0.66) 0%, rgba(13, 36, 64, 0.78) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    padding: 12px;
    text-align: left;
    text-decoration: none;
    animation: af-float 3.2s ease-in-out infinite;
}
.af-float-card:nth-child(2) { animation-delay: 0.4s; }
.af-float-card:nth-child(3) { animation-delay: 0.8s; }
.af-float-card:nth-child(4) { animation-delay: 1.2s; }
.af-float-name {
    color: var(--af-title);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
}
.af-float-price {
    margin-top: 8px;
    display: inline-block;
    background: var(--af-price-bg);
    color: var(--af-price-text);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
@keyframes af-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ---------- Recherche + groupes ---------- */
.af-search {
    margin: 26px auto 0;
    max-width: 640px;
    display: flex;
    gap: 8px;
}
.af-search input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(13, 36, 64, 0.55);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    color: var(--af-title);
    font-size: 15px;
    outline: none;
    min-width: 0;
}
.af-search input::placeholder { color: var(--af-muted); }
.af-search input:focus { border-color: var(--af-gold); }
.af-chips {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.af-chip {
    background: var(--af-glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid var(--af-glass-border);
    color: var(--af-text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
}

/* ---------- Titres de section ---------- */
.af-section-title {
    margin: 34px 0 4px;
    color: var(--af-title);
    font-size: 22px;
    font-weight: 800;
}
.af-section-sub { margin: 0 0 4px; color: var(--af-muted); font-size: 14px; }

/* ---------- Grille des services ---------- */
.af-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Carte service : anneau dore qui circule (rotation par transform,
   aucun repeint continu — meme effet que le BLOC 27 d'alitelflach). */
.af-card {
    position: relative;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    background: var(--af-card);
    content-visibility: auto;
    contain-intrinsic-size: auto 150px;
}
.af-card::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        transparent 300deg,
        var(--af-gold) 330deg,
        var(--af-gold-bright) 350deg,
        var(--af-gold) 360deg);
    animation: af-spin 5s linear infinite;
}
@keyframes af-spin { to { transform: rotate(360deg); } }
.af-card-inner {
    position: relative;
    margin: 2px;
    border-radius: 22px;
    /* Verre teinté (pas translucide : l'anneau doré/vert qui
       circule derrière ne doit pas traverser la carte) : dégradé
       solide + reflet en haut + ombre douce, comme iOS 26. */
    background: linear-gradient(160deg, #16345e 0%, #0d2440 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 14px 34px rgba(2, 8, 23, 0.35);
    padding: 16px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
}
html[data-theme="light"] .af-card-inner {
    background: linear-gradient(160deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 34px rgba(15, 23, 42, 0.14);
}
.af-card-title {
    margin: 0;
    color: var(--af-title);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.af-card-group {
    margin: 6px 0 0;
    color: var(--af-muted);
    font-size: 12px;
}
.af-card-bottom {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.af-delay {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--af-text);
    font-size: 13px;
    white-space: nowrap;
    min-width: 0;
}
.af-delay svg { flex: none; }
.af-delay-text {
    overflow: hidden;
    text-overflow: ellipsis;
}
.af-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.af-bar { width: 3px; border-radius: 2px; background: #2a4a6b; }
.af-bar:nth-child(1) { height: 5px; }
.af-bar:nth-child(2) { height: 8px; }
.af-bar:nth-child(3) { height: 11px; }
.af-bar:nth-child(4) { height: 14px; }
.af-bar.on { background: var(--af-bar-color, var(--af-green)); }
.af-dots {
    flex: 1;
    border-bottom: 2px dotted #33507a;
    transform: translateY(-4px);
    min-width: 12px;
}
.af-price {
    background: var(--af-price-bg);
    color: var(--af-price-text);
    font-weight: 800;
    font-size: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    white-space: nowrap;
}
.af-price small { font-size: 11px; font-weight: 700; opacity: 0.75; }
.af-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--af-muted);
    padding: 40px 0;
}

/* ---------- Pagination ---------- */
.af-pagination { margin: 26px 0 8px; display: flex; justify-content: center; }
.af-pagination nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.af-pagination a, .af-pagination span {
    display: inline-block;
    min-width: 34px;
    padding: 7px 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    background: rgba(13, 36, 64, 0.85) !important;
    border: 1px solid var(--af-card-border) !important;
    color: var(--af-text) !important;
}
.af-pagination span[aria-current="page"] {
    background: var(--af-gold) !important;
    border-color: var(--af-gold) !important;
    color: #231a02 !important;
    font-weight: 700;
}
.af-pagination svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Défilement continu (liste jusqu'au dernier) ---------- */
.af-load-more { margin: 26px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 40px; }
/* Sans cette règle, le display:flex ci-dessus écrase l'attribut hidden
   et la sentinelle resterait visible (vide) en fin de liste. */
.af-load-more[hidden] { display: none; }
.af-load-more-loading { color: var(--af-muted); font-size: 14px; margin: 0; }
.af-load-more-end { color: var(--af-muted); font-size: 14px; margin: 0; }

/* ---------- Page detail service ---------- */
.af-detail {
    background: var(--af-card);
    border: 1px solid var(--af-card-border);
    border-radius: var(--af-radius);
    padding: 26px;
    margin-top: 26px;
}
.af-detail h1 { margin: 0; color: var(--af-title); font-size: 24px; line-height: 1.3; }
.af-detail-meta {
    margin: 10px 0 0;
    color: var(--af-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.af-detail-price {
    margin: 18px 0 0;
    display: inline-block;
    background: var(--af-price-bg);
    color: var(--af-price-text);
    font-weight: 800;
    font-size: 20px;
    padding: 8px 18px;
    border-radius: 999px;
}
.af-detail-price small { font-size: 13px; font-weight: 700; opacity: 0.75; }
.af-detail-desc { margin: 18px 0 0; color: var(--af-text); font-size: 15px; line-height: 1.7; }
.af-detail-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Formulaire de commande sur la page détail d'un service. */
.af-order-form { display: flex; flex-direction: column; gap: 8px; flex: 1 1 100%; }
.af-order-label { color: var(--af-text); font-size: 14px; font-weight: 600; }
.af-order-input {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--af-card-border);
    font-size: 15px;
    outline: none;
    width: 100%;
}
.af-order-input:focus { border-color: var(--af-gold); }
.af-order-form .af-btn { align-self: flex-start; }
.af-order-error { margin: 0; color: #f87171; font-size: 13px; }
.af-detail-status {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.4);
    color: var(--af-title);
    font-size: 14px;
}

/* ---------- Pages simples (formulaires, suivi) ---------- */
.af-panel {
    background: var(--af-card);
    border: 1px solid var(--af-card-border);
    border-radius: var(--af-radius);
    padding: 24px;
    margin-top: 26px;
}
.af-panel h1, .af-panel h2 { color: var(--af-title); margin-top: 0; }
.af-panel label { color: var(--af-text); }
.af-panel input, .af-panel select, .af-panel textarea {
    background: rgba(6, 18, 36, 0.7);
    border: 1px solid var(--af-card-border);
    color: var(--af-title);
}

/* ---------- Pied de page ---------- */
.af-footer {
    margin-top: 48px;
    border-top: 1px solid var(--af-card-border);
    padding: 22px 16px 30px;
    text-align: center;
    color: var(--af-muted);
    font-size: 13px;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .af-grid { grid-template-columns: repeat(2, 1fr); }
    .af-float-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .af-grid { grid-template-columns: 1fr; }
    .af-header-inner { padding: 10px 12px; }
    .af-nav-link { padding: 6px 6px; font-size: 13px; }
    .af-banner { padding: 30px 12px 20px; }
    .af-detail { padding: 18px; }
    .af-float-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ================================================================
   BOUTIQUE — pages invité (commande sans compte, suivi)
   Ces pages utilisent des cartes claires Breeze : on les passe
   en sombre pour rester dans le thème.
   ================================================================ */
.af-body .bg-white { background-color: #0d2440; border: 1px solid #1e3a5f; }
.af-body .text-gray-900, .af-body .text-gray-800 { color: #ffffff; }
.af-body .text-gray-700, .af-body .text-gray-600 { color: #cbd5e1; }
.af-body .text-gray-500, .af-body .text-gray-400 { color: #94a3b8; }
.af-body .border-gray-300 { border-color: #1e3a5f; }
.af-body input, .af-body select, .af-body textarea {
    background-color: #0a1931;
    color: #f1f5f9;
    border-color: #1e3a5f;
}
.af-body input::placeholder { color: #64748b; }

/* ================================================================
   ZONE CONNECTÉE — tableau de bord client + admin + connexion
   Le layout Breeze est clair par défaut : on le passe en sombre
   (même fond bleu nuit, cartes #0d2440, boutons dorés, logo texte).
   Les règles sont limitées à .af-app / .af-guest pour ne pas
   toucher à la boutique.
   ================================================================ */
.af-app, .af-guest {
    background: linear-gradient(180deg, #061224 0%, #0a1931 45%, #0d2b52 100%);
    color: #e2e8f0;
    min-height: 100vh;
    color-scheme: dark;
}
.af-logo-nav { font-size: 22px; }

/* --- Fonds --- */
.af-app .bg-gray-100, .af-guest .bg-gray-100 { background-color: transparent; }
.af-app .bg-gray-50, .af-guest .bg-gray-50 { background-color: #0a1931; }
.af-app main .bg-white { background-color: #0d2440; border: 1px solid #1e3a5f; }
.af-guest .bg-white { background-color: #0d2440; border: 1px solid #1e3a5f; }
.af-app header.bg-white {
    background-color: #0a1931;
    border-bottom: 1px solid #1e3a5f;
    box-shadow: none;
}
/* La règle visait la barre Breeze, supprimée par la navigation
   unifiée (2026-11-21) : on exclut les <nav> de l'en-tête boutique
   (.af-nav) et du tiroir (.af-drawer-nav), sinon le fond sombre
   peint une bande dans l'en-tête et assombrit les liens du tiroir
   blanc. */
.af-app nav:not(.af-nav):not(.af-drawer-nav) { background-color: #0a1931; border-bottom: 1px solid #1e3a5f; }
.af-app nav .bg-white { background-color: #0d2440; border: 1px solid #1e3a5f; }

/* --- Textes --- */
.af-app .text-gray-900, .af-app .text-gray-800,
.af-guest .text-gray-900, .af-guest .text-gray-800 { color: #ffffff; }
.af-app .text-gray-700, .af-app .text-gray-600,
.af-guest .text-gray-700, .af-guest .text-gray-600 { color: #cbd5e1; }
.af-app .text-gray-500, .af-app .text-gray-400,
.af-guest .text-gray-500, .af-guest .text-gray-400 { color: #94a3b8; }

/* --- Bordures --- */
.af-app .border-gray-100, .af-app .border-gray-200, .af-app .border-gray-300,
.af-guest .border-gray-100, .af-guest .border-gray-200, .af-guest .border-gray-300 { border-color: #1e3a5f; }
.af-app .border-t, .af-app .border-b { border-color: #1e3a5f; }

/* --- Champs de saisie --- */
.af-app input, .af-app select, .af-app textarea,
.af-guest input, .af-guest select, .af-guest textarea {
    background-color: #0a1931;
    color: #f1f5f9;
    border-color: #1e3a5f;
}
.af-app input::placeholder, .af-guest input::placeholder { color: #64748b; }
.af-app input[type="checkbox"], .af-guest input[type="checkbox"] { background-color: #0a1931; }

/* --- Boutons principaux dorés (le bouton Breeze est gris foncé) --- */
.af-app .bg-gray-800, .af-guest .bg-gray-800 {
    background: linear-gradient(180deg, #f0cd6b 0%, #d4af37 55%, #b8912f 100%);
    color: #231a02;
    border-color: #b8912f;
}
.af-app .bg-gray-800:hover, .af-guest .bg-gray-800:hover { filter: brightness(1.08); }

/* --- Liens de navigation : actif doré au lieu d'indigo --- */
.af-app .border-indigo-400 { border-color: #d4af37; }
.af-app .bg-indigo-50 { background-color: rgba(212, 175, 55, 0.12); }
.af-app .text-indigo-600, .af-app .text-indigo-700 { color: #e3c766; }
.af-app .focus\:border-indigo-700:focus { border-color: #d4af37; }

/* --- Survols --- */
.af-app .hover\:bg-gray-100:hover { background-color: rgba(255, 255, 255, 0.06); }
.af-app .hover\:text-gray-700:hover, .af-app .hover\:text-gray-500:hover,
.af-app .focus\:text-gray-700:focus { color: #ffffff; }
.af-app .hover\:border-gray-300:hover, .af-app .focus\:border-gray-300:focus { border-color: #d4af37; }

/* ==========================================================================
   ADMIN ALITELFLACH — barre latérale noire en accordéon, badges, graphique
   (appris de l'étude admin d'alitelflach.com, 2026-11-20)
   ========================================================================== */
.af-admin { display: flex; align-items: flex-start; }
.af-sidebar {
    width: 248px; flex-shrink: 0;
    background: #0a1931;
    border-right: 1px solid #1e3a5f;
    padding: 16px 12px 24px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.af-sidebar-logo { display: block; margin: 4px 4px 2px; }
.af-sidebar-sub { color: #94a3b8; font-size: 12px; margin: 0 4px 14px; }
.af-side-section { margin-bottom: 6px; }
.af-side-section summary {
    color: #e2e8f0; font-size: 13px; font-weight: 600;
    padding: 8px 10px; cursor: pointer; border-radius: 8px; list-style: none;
}
.af-side-section summary::-webkit-details-marker { display: none; }
.af-side-section summary:hover { background: #0d2440; }
.af-side-links { display: flex; flex-direction: column; padding: 2px 0 6px 10px; }
.af-side-links a {
    color: #cbd5e1; font-size: 13px; padding: 7px 10px; border-radius: 8px;
    text-decoration: none; display: flex; justify-content: space-between;
    align-items: center; gap: 8px;
}
.af-side-links a:hover { background: #0d2440; color: #ffffff; }
.af-side-links a.active { background: #d4af37; color: #231a02; font-weight: 600; }
.af-side-count {
    background: #dc2626; color: #ffffff; border-radius: 999px;
    font-size: 11px; padding: 1px 7px; font-weight: 700;
}
.af-side-foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid #1e3a5f; }
.af-admin-main { flex: 1; min-width: 0; }

/* Tiroir ADMIN sur téléphone (≤900 px) : la barre latérale
   devient un tiroir caché, comme le tiroir boutique (demande
   de Badra, 2026-11-21 : « si on appuie une nouvelle page doit
   remplacer l'autre » — la page s'ouvre en plein écran, menu
   fermé). La barre « Menu admin » et le × sont masqués sur
   ordinateur (la barre reste fixe à gauche) ; l'overlay est
   masqué tant que le tiroir est fermé. */
.af-admin-bar { display: none; }
.af-admin-close { display: none; }
.af-admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 10, 22, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 90;
}
body.af-admin-open { overflow: hidden; }
body.af-admin-open .af-admin-overlay { opacity: 1; visibility: visible; }

/* Badges arrondis (statuts, comme alitelflach) */
.af-badge {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.af-badge-green { background: #14532d; color: #86efac; }
.af-badge-orange { background: #78350f; color: #fcd34d; }
.af-badge-red { background: #7f1d1d; color: #fca5a5; }
.af-badge-gold { background: #d4af37; color: #231a02; }
.af-badge-gray { background: #1e3a5f; color: #cbd5e1; }

.af-side-num { color: #94a3b8; font-size: 12px; font-weight: 600; }

/* Boutons du tableau de bord en cercles (formes différentes des rectangles d'alitelflach) */
.af-stat-circle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    width: min(150px, 100%); aspect-ratio: 1; margin: 0 auto;
    border-radius: 50%; border: 3px solid; text-decoration: none;
}
.af-stat-circle:hover { filter: brightness(0.97); }
.af-stat-icon { width: 28px; height: 28px; }
.af-stat-num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.af-stat-label { font-size: 12px; font-weight: 600; }
.af-stat-blue { background: #dbeafe; border-color: #1e40af; color: #1e3a5f; }
.af-stat-orange { background: #ffedd5; border-color: #c2410c; color: #9a3412; }
.af-stat-green { background: #d1fae5; border-color: #047857; color: #065f46; }
.af-stat-red { background: #fee2e2; border-color: #b91c1c; color: #991b1b; }

/* Graphique en courbe (profit des 30 derniers jours) */
.af-line-chart { width: 100%; height: auto; display: block; }

@media (max-width: 900px) {
    .af-admin { flex-direction: column; }

    /* En colonne, align-items: flex-start (défini sur .af-admin)
       donne à .af-admin-main la largeur de son contenu : le
       tableau le plus large (963 px) élargissait TOUTE la page
       (1013 px à 800 px de large). On contraint la zone à la
       largeur du conteneur ; le tableau défile alors DANS sa
       carte (overflow-x-auto), comme sur ordinateur. */
    .af-admin-main { width: 100%; }

    /* Barre « Menu admin » : visible seulement sur téléphone,
       collante en haut de la page. C'est elle qui ouvre le
       tiroir admin (le bouton est vert, comme le hamburger
       boutique, mais c'est un bouton DÉDIÉ à l'admin). */
    .af-admin-bar {
        display: flex; align-items: center; gap: 10px;
        position: sticky; top: 0; z-index: 80;
        background: #0a1931; color: #e2e8f0;
        padding: 10px 12px;
    }
    .af-admin-burger {
        display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
        width: 40px; height: 36px; padding: 0; border: 0; border-radius: 10px;
        background: var(--af-green); cursor: pointer;
        flex-shrink: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    }
    .af-admin-burger span { display: block; width: 22px; height: 2.5px; background: #ffffff; border-radius: 2px; }
    .af-admin-burger:active { transform: scale(0.96); }
    .af-admin-bar-title { font-size: 15px; font-weight: 600; }

    /* Le × du tiroir admin : visible seulement sur téléphone. */
    .af-admin-close {
        display: block; position: absolute; top: 8px; right: 10px;
        width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
        background: transparent; color: #cbd5e1; font-size: 26px; line-height: 1; cursor: pointer;
    }
    .af-admin-close:hover { background: #0d2440; color: #ffffff; }

    /* La barre latérale devient un tiroir caché, comme le tiroir
       boutique : fermée par défaut, elle glisse par-dessus le
       contenu. La page s'ouvre donc en plein écran, menu fermé ;
       appuyer sur un lien referme le tiroir et la nouvelle page
       remplace l'autre. */
    .af-sidebar {
        position: fixed; top: 0; right: 0;
        width: min(340px, 88vw); height: 100%;
        transform: translateX(105%);
        transition: transform 0.25s ease;
        z-index: 100;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
    }
    body.af-admin-open .af-sidebar { transform: translateX(0); }

    /* ARABE (RTL) : le tiroir glisse depuis la gauche, comme le
       tiroir boutique. PIÈGE (vu sur le tiroir boutique le
       2026-11-21) : la règle cachée RTL a la même spécificité
       (0,2,1) que la règle d'ouverture — il faut une règle
       d'ouverture RTL PLUS SPÉCIFIQUE (0,3,2), sinon le tiroir
       ne s'ouvre jamais en arabe. */
    html[dir="rtl"] .af-sidebar {
        left: 0; right: auto;
        transform: translateX(-105%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }
    html[dir="rtl"] body.af-admin-open .af-sidebar { transform: translateX(0); }
    html[dir="rtl"] .af-admin-close { left: 10px; right: auto; }
}

/* ===== ONGLETS VERTICAUX (détail client, Site Admin) ===== */
.af-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 220px;
    flex: none;
}
.af-tabs-horizontal {
    flex-direction: row;
    width: auto;
    flex-wrap: wrap;
}
.af-tab {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #1e3a5f;
    background: #0d2440;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.af-tab:hover {
    border-color: #d4af37;
    color: #fff;
}
.af-tab.active {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border-color: #d4af37;
    color: #231a02;
}
/* ===== ONGLETS HORIZONTAUX DU DÉTAIL API (comme alitelflach) =====
   Page détail API seulement : API Info, Pricing, Manage, Services, Delete.
   Défilants sur téléphone (overflow-x-auto), onglet actif en gras avec
   barre dorée en dessous, comme la référence. */
.af-api-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    border-bottom: 1px solid #1e3a5f;
    scrollbar-width: thin;
}
.af-api-tab {
    flex: none;
    padding: 12px 16px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.af-api-tab:hover { color: #ffffff; }
.af-api-tab.active {
    color: #ffffff;
    font-weight: 700;
    border-bottom-color: #d4af37;
}
/* ===== INTERRUPTEUR (toggle) — onglet Manage du détail API =====
   Même case à cocher qu'avant (name/value inchangés, envoi identique),
   présentée comme un interrupteur comme sur alitelflach. */
.af-switch {
    position: relative;
    display: inline-flex;
    flex: none;
    width: 52px;
    height: 28px;
}
.af-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.af-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #1e3a5f;
    border: 1px solid #2b4a73;
    transition: background .15s;
}
.af-switch-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform .15s;
}
.af-switch input:checked + .af-switch-slider { background: #d4af37; border-color: #d4af37; }
.af-switch input:checked + .af-switch-slider::after { transform: translateX(24px); }
.af-switch input:focus-visible + .af-switch-slider { outline: 2px solid #d4af37; outline-offset: 2px; }
/* Bouton rouge (suppressions) */
.af-btn-danger {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border: 1px solid #dc2626;
}
.af-btn-danger:hover { filter: brightness(1.1); }

/* ---------- Bouton hamburger vert (tiroir, comme alitelflach) ---------- */
.af-burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--af-green);
    cursor: pointer;
}
.af-burger span { display: block; width: 22px; height: 2.5px; background: #ffffff; border-radius: 2px; }
.af-burger:active { transform: scale(0.96); }
.af-admin-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, 0.18); margin: 0 4px; }
.af-btn-admin {
    background: #0d2440;
    color: var(--af-gold);
    border: 1.5px solid var(--af-gold);
}
.af-btn-admin:hover { background: rgba(212, 175, 55, 0.12); }

/* ---------- Tiroir lateral (comme alitelflach) ---------- */
.af-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 10, 22, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 90;
}
.af-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100%;
    /* Verre flottant iOS 26 (2026-11-22) : le tiroir glisse
       par-dessus la boutique, translucide et flouté. */
    background: var(--af-glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    color: var(--af-text);
    transform: translateX(105%);
    transition: transform 0.25s ease;
    z-index: 100;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
}
body.af-drawer-open { overflow: hidden; }
body.af-drawer-open .af-drawer { transform: translateX(0); }
body.af-drawer-open .af-drawer-overlay { opacity: 1; visibility: visible; }
.af-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--af-bg2);
    padding: 12px 16px;
}
.af-drawer-logo { font-size: 22px; }
.af-drawer-close {
    background: transparent;
    border: 0;
    color: var(--af-title);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.af-drawer-title { font-size: 19px; font-weight: 700; color: var(--af-title); padding: 18px 16px 6px; margin: 0; }
.af-drawer-nav { padding: 4px 0; }
.af-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 16px;
    color: var(--af-text);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid var(--af-card-border);
}
.af-drawer-link:hover { background: var(--af-bg2); }
.af-drawer-chevron { color: var(--af-muted); font-size: 18px; }
.af-drawer-section {
    margin: 0;
    padding: 20px 16px 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--af-title);
}
.af-drawer-logout-form { padding: 20px 16px 28px; }
.af-drawer-logout {
    display: block;
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    background: var(--af-green);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.af-drawer-logout:active { transform: scale(0.98); }

/* ---------- Pastilles de groupes cliquables ---------- */
.af-chip { text-decoration: none; }
.af-chip-active { background: var(--af-gold); color: #231a02; font-weight: 700; }


/* ================================================================
   TIROIR PAR BLOCS + MODE CLAIR + LANGUES (2026-11-21)
   Le tiroir s'organise en blocs comme le menu d'alitelflach.com :
   SERVICES, COMPTE, Mode clair/sombre, LANGUE, Déconnexion.
   ================================================================ */

/* --- Blocs du tiroir (cartes grises arrondies, comme la photo) --- */
.af-drawer-block {
    margin: 12px 12px 0;
    background: var(--af-bg2);
    border-radius: 14px;
    padding: 4px 0 6px;
    overflow: hidden;
}
.af-drawer-block-title {
    margin: 0;
    padding: 10px 16px 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--af-muted);
}
.af-drawer-block .af-drawer-link { border-bottom: 1px solid var(--af-card-border); }
.af-drawer-block .af-drawer-link:last-child { border-bottom: 0; }

/* --- Bascule Mode clair / Mode sombre (deux boutons côte à côte) --- */
.af-theme-toggle {
    display: flex;
    margin: 12px 12px 0;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}
.af-theme-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border-radius: 9px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.af-theme-btn.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* --- Boutons de langue --- */
.af-lang-row {
    display: flex;
    gap: 8px;
    padding: 4px 16px 12px;
    flex-wrap: wrap;
}
.af-lang-btn {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.af-lang-btn.active {
    background: var(--af-gold);
    border-color: var(--af-gold);
    color: #231a02;
}

/* ================================================================
   THEME CLAIR — toute la boutique + la zone connectée client.
   L'admin reste en sombre (voir .af-admin-zone). Le tiroir suit
   le thème depuis le 2026-11-22 (variables --af-*). Défaut :
   sombre (look actuel).
   ================================================================ */
html[data-theme="light"] {
    --af-bg1: #eef2f7;
    --af-bg2: #f3f4f6;
    --af-bg3: #e8ecf1;
    --af-card: #ffffff;
    --af-card-border: #d1d5db;
    --af-title: #111827;
    --af-text: #1f2937;
    --af-muted: #6b7280;
}

/* En-tête + bannière + recherche + pastilles */
html[data-theme="light"] .af-header { background: rgba(255, 255, 255, 0.78); }
html[data-theme="light"] .af-nav-link:hover { background: rgba(0, 0, 0, 0.05); }
html[data-theme="light"] .af-btn-ghost { color: #8a6d1b; border-color: #b8912f; }
html[data-theme="light"] .af-search input { background: #ffffff; }
html[data-theme="light"] .af-chip { background: #ffffff; }
html[data-theme="light"] .af-back { background: #ffffff; }
html[data-theme="light"] .af-dots { border-bottom-color: #d1d5db; }
html[data-theme="light"] .af-bar:not(.on) { background: #d1d5db; }
html[data-theme="light"] .af-delay svg { stroke: #6b7280; }
html[data-theme="light"] .af-pagination a,
html[data-theme="light"] .af-pagination span {
    background: #ffffff !important;
    color: #1f2937 !important;
}
html[data-theme="light"] .af-order-error { color: #dc2626; }
html[data-theme="light"] .af-panel input,
html[data-theme="light"] .af-panel select,
html[data-theme="light"] .af-panel textarea { background: #ffffff; }

/* Pages invité de la boutique (cartes claires Breeze) */
html[data-theme="light"] .af-body .bg-white { background-color: #ffffff; border: 1px solid #e5e7eb; }
html[data-theme="light"] .af-body .text-gray-900,
html[data-theme="light"] .af-body .text-gray-800 { color: #111827; }
html[data-theme="light"] .af-body .text-gray-700,
html[data-theme="light"] .af-body .text-gray-600 { color: #374151; }
html[data-theme="light"] .af-body .text-gray-500,
html[data-theme="light"] .af-body .text-gray-400 { color: #6b7280; }
html[data-theme="light"] .af-body .border-gray-300 { border-color: #d1d5db; }
html[data-theme="light"] .af-body input,
html[data-theme="light"] .af-body select,
html[data-theme="light"] .af-body textarea {
    background-color: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}
html[data-theme="light"] .af-body input::placeholder { color: #9ca3af; }

/* Zone connectée client (.af-app / .af-guest) — l'admin (.af-admin-zone)
   est exclu : il reste en sombre. */
html[data-theme="light"] .af-app:not(.af-admin-zone),
html[data-theme="light"] .af-guest {
    background: #f3f4f6;
    color: #111827;
    color-scheme: light;
}
html[data-theme="light"] .af-app:not(.af-admin-zone) .bg-gray-100,
html[data-theme="light"] .af-guest .bg-gray-100 { background-color: #f3f4f6; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .bg-gray-50,
html[data-theme="light"] .af-guest .bg-gray-50 { background-color: #ffffff; }
html[data-theme="light"] .af-app:not(.af-admin-zone) main .bg-white,
html[data-theme="light"] .af-guest .bg-white { background-color: #ffffff; border: 1px solid #e5e7eb; }
html[data-theme="light"] .af-app:not(.af-admin-zone) header.bg-white {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* Même exclusion qu'en sombre (voir plus haut) : sans elle, la
   règle peindrait une bande blanche dans l'en-tête clair et une
   bordure sous les liens du tiroir. */
html[data-theme="light"] .af-app:not(.af-admin-zone) nav:not(.af-nav):not(.af-drawer-nav) { background-color: #ffffff; border-bottom: 1px solid #e5e7eb; }
html[data-theme="light"] .af-app:not(.af-admin-zone) nav .bg-white { background-color: #ffffff; border: 1px solid #e5e7eb; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-900,
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-800,
html[data-theme="light"] .af-guest .text-gray-900,
html[data-theme="light"] .af-guest .text-gray-800 { color: #111827; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-700,
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-600,
html[data-theme="light"] .af-guest .text-gray-700,
html[data-theme="light"] .af-guest .text-gray-600 { color: #374151; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-500,
html[data-theme="light"] .af-app:not(.af-admin-zone) .text-gray-400,
html[data-theme="light"] .af-guest .text-gray-500,
html[data-theme="light"] .af-guest .text-gray-400 { color: #6b7280; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .border-gray-100,
html[data-theme="light"] .af-app:not(.af-admin-zone) .border-gray-200,
html[data-theme="light"] .af-app:not(.af-admin-zone) .border-gray-300,
html[data-theme="light"] .af-guest .border-gray-100,
html[data-theme="light"] .af-guest .border-gray-200,
html[data-theme="light"] .af-guest .border-gray-300 { border-color: #e5e7eb; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .border-t,
html[data-theme="light"] .af-app:not(.af-admin-zone) .border-b { border-color: #e5e7eb; }
html[data-theme="light"] .af-app:not(.af-admin-zone) input,
html[data-theme="light"] .af-app:not(.af-admin-zone) select,
html[data-theme="light"] .af-app:not(.af-admin-zone) textarea,
html[data-theme="light"] .af-guest input,
html[data-theme="light"] .af-guest select,
html[data-theme="light"] .af-guest textarea {
    background-color: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}
html[data-theme="light"] .af-app:not(.af-admin-zone) input::placeholder,
html[data-theme="light"] .af-guest input::placeholder { color: #9ca3af; }
html[data-theme="light"] .af-app:not(.af-admin-zone) input[type="checkbox"],
html[data-theme="light"] .af-guest input[type="checkbox"] { background-color: #ffffff; }
html[data-theme="light"] .af-app:not(.af-admin-zone) .hover\:bg-gray-100:hover { background-color: rgba(0, 0, 0, 0.05); }
html[data-theme="light"] .af-app:not(.af-admin-zone) .hover\:text-gray-700:hover,
html[data-theme="light"] .af-app:not(.af-admin-zone) .hover\:text-gray-500:hover,
html[data-theme="light"] .af-app:not(.af-admin-zone) .focus\:text-gray-700:focus { color: #111827; }

/* ================================================================
   ARABE (RTL) — la flèche retour et les chevrons se retournent,
   le tiroir glisse depuis la gauche, les champs s'alignent à droite.
   ================================================================ */
html[dir="rtl"] .af-back { transform: scaleX(-1); }
html[dir="rtl"] .af-drawer-chevron { transform: scaleX(-1); }
html[dir="rtl"] .af-drawer {
    left: 0;
    right: auto;
    transform: translateX(-105%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}
/* Ouverture en RTL : cette règle DOIT gagner sur le
   translateX(-105%) ci-dessus. Les deux règles en conflit ont la
   même spécificité (0,2,1) et la règle RTL vient après dans le
   fichier, donc sans elle le tiroir restait hors écran en arabe
   même avec body.af-drawer-open (le bouton marchait, le tiroir
   ne s'affichait jamais). Spécificité (0,3,2) : html + [dir] +
   body + 2 classes — supérieure aux deux règles en conflit.
   Le tiroir garde son sens RTL (il glisse depuis la gauche). */
html[dir="rtl"] body.af-drawer-open .af-drawer { transform: translateX(0); }
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea { text-align: right; }

/* ================================================================
   EN-TÊTE : contrôles thème / langue (2026-11-21, demande de
   Badra : « remet les dehors » — visibles sans ouvrir le tiroir).
   Le tiroir ne garde que la navigation (SERVICES / COMPTE +
   Déconnexion). Le changement reste sans navigation (fetch).
   ================================================================ */
.af-header-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.af-header-theme { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.af-header-theme .af-theme-btn { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 999px; color: var(--af-text); }
.af-header-theme .af-theme-btn svg { display: block; }
.af-header-theme .af-theme-btn.active { background: var(--af-gold); color: #231a02; box-shadow: none; }
.af-header-lang { display: flex; gap: 4px; }
.af-header-lang .af-lang-btn { flex: none; padding: 6px 8px; font-size: 12px; }
html[data-theme="light"] .af-header-theme { background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.08); }

/* Hamburger : ne jamais être écrasé par le logo ou les contrôles,
   et pas de délai de double-toucher sur téléphone. */
.af-burger { flex-shrink: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- En-tête sur téléphone (<= 560 px) ---------- */
@media (max-width: 560px) {
    /* Connexion / Inscription sont déjà dans le tiroir : on les
       cache de l'en-tête pour laisser la place aux contrôles
       thème/langue et au hamburger. */
    .af-header-auth { display: none; }
    .af-header-inner { gap: 8px; }
    .af-header-controls { gap: 6px; }
    .af-burger { width: 40px; height: 36px; }
    /* Nom de boutique long : il se coupe avec ... au lieu de
       pousser les contrôles hors de l'écran. */
    .af-logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 380px) {
    .af-logo { font-size: 20px; }
}

/* ---------- Suivi de commande : le cercle vert ---------- */
/* Le cercle vert tourne vite tant que la commande est en cours
   (page orders.track) ; le nombre de secondes écoulées est compté
   dedans. À la livraison, le cercle s'arrête, devient vert plein
   avec une coche, et le panneau Succès affiche « Livrée en X
   secondes ». En cas de refus/remboursement, le cercle s'arrête
   avec une croix rouge. Lisible en sombre comme en clair : le
   vert #00c853 est visible sur les deux fonds. */
.af-track-scene { margin-top: 18px; }
.af-steps { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.af-step { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--af-muted); }
.af-step .af-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--af-muted); background: transparent; }
.af-step.af-done { color: var(--af-gold); }
.af-step.af-done .af-dot { background: var(--af-gold); border-color: var(--af-gold); }
.af-step.af-active { color: var(--af-text); }
.af-step.af-active .af-dot { border-color: var(--af-gold); background: var(--af-gold); animation: af-dot-pulse 1.2s ease-in-out infinite; }
@keyframes af-dot-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(212, 175, 55, 0); } }

/* Bouton haut-parleur (voix) : à droite, au-dessus du cercle. */
.af-voice-row { display: flex; justify-content: flex-end; margin: 12px 0 4px; }
.af-voice-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--af-text); background: var(--af-card); border: 1px solid var(--af-card-border); border-radius: 9999px; padding: 6px 12px; cursor: pointer; }
.af-voice-toggle svg { width: 18px; height: 18px; flex: none; }
.af-voice-toggle .af-voice-icon--off { display: none; }
.af-voice-toggle.af-voice-off .af-voice-icon--on { display: none; }
.af-voice-toggle.af-voice-off .af-voice-icon--off { display: inline; }
.af-voice-toggle.af-voice-off { color: var(--af-muted); }

.af-circle-wrap { display: flex; justify-content: center; margin-top: 14px; }
.af-circle { position: relative; width: 180px; height: 180px; }
.af-circle-ring { position: absolute; inset: 0; border-radius: 50%; border: 10px solid rgba(0, 200, 83, 0.18); border-top-color: #00c853; animation: af-spin 0.9s linear infinite; }
/* af-spin existe déjà plus haut (anneau doré des cartes) : même
   rotation, seule la durée change ici (0,9 s = tour rapide). */
.af-circle-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.af-circle-seconds { font-size: 54px; font-weight: 800; line-height: 1; color: var(--af-text); }
.af-circle-seconds--small { font-size: 30px; }
.af-circle-seconds-label { font-size: 13px; font-weight: 700; color: var(--af-muted); }
.af-circle-check, .af-circle-cross { width: 72px; height: 72px; }
.af-circle-check { color: #ffffff; }
.af-circle-cross { color: #ef4444; }
.af-delivered .af-circle-ring { animation: none; border-color: #00c853; background: #00c853; }
.af-stopped .af-circle-ring { animation: none; border-color: #ef4444; }

.af-track-note { text-align: center; color: var(--af-muted); font-size: 14px; margin: 14px 0 0; }
.af-track-success { text-align: center; margin-top: 14px; }
.af-track-success-title { font-size: 26px; font-weight: 800; color: var(--af-gold); margin: 0 0 8px; }
.af-track-seconds { font-size: 16px; font-weight: 700; color: var(--af-text); margin: 0 0 8px; }
.af-track-code-label { font-size: 13px; font-weight: 700; color: var(--af-muted); margin: 0 0 4px; }
.af-track-code { display: inline-block; font-size: 18px; font-weight: 800; color: var(--af-text); background: var(--af-card); border: 1px solid var(--af-gold); border-radius: 10px; padding: 10px 14px; margin: 0; word-break: break-all; }
.af-track-refused { text-align: center; margin-top: 14px; }
.af-track-refused-title { font-size: 20px; font-weight: 800; color: #ef4444; margin: 0 0 6px; }
.af-track-refused p { color: var(--af-muted); margin: 0; }

@media (max-width: 560px) {
    .af-circle { width: 150px; height: 150px; }
    .af-circle-seconds { font-size: 44px; }
    .af-circle-seconds--small { font-size: 26px; }
    .af-circle-check, .af-circle-cross { width: 60px; height: 60px; }
    .af-step { font-size: 12px; }
    .af-track-success-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .af-circle-ring, .af-step.af-active .af-dot { animation: none; }
}

/* ================================================================
   CONNEXION — cartes « verre flottant » iOS 26 (2026-11-22)
   La carte invité (layout guest, non modifiable) devient un verre
   translucide aux coins très arrondis, qui flotte doucement sur
   le fond bleu nuit. Les boutons reprennent la modale de
   référence : bleu pour « Se connecter », blanc pour Google,
   contour pour le lien secondaire.
   ================================================================ */
@keyframes af-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes af-pop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

html[data-theme="dark"] .af-guest .bg-white {
    background: linear-gradient(160deg, rgba(28, 58, 102, 0.66) 0%, rgba(13, 36, 64, 0.78) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(2, 8, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    animation: af-float 7s ease-in-out infinite;
}

html[data-theme="light"] .af-guest .bg-white {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.85) 0%, rgba(226, 232, 240, 0.8) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: af-float 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="dark"] .af-guest .bg-white,
    html[data-theme="light"] .af-guest .bg-white { animation: none; }
    .af-success-check { animation: none; }
}

/* --- Contenu de la carte de connexion / inscription --- */
.af-auth { text-align: start; }

.af-auth-title {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem;
}

html[data-theme="light"] .af-auth-title { color: #111827; }

.af-auth-subtitle {
    color: #cbd5e1;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

html[data-theme="light"] .af-auth-subtitle { color: #4b5563; }

.af-auth-field { margin-bottom: 1rem; }

.af-auth-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.af-auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.af-auth-forgot {
    font-size: 0.875rem;
    color: #7db4ff;
    text-decoration: none;
    white-space: nowrap;
}

.af-auth-forgot:hover { text-decoration: underline; }

html[data-theme="light"] .af-auth-forgot { color: #2563eb; }

.af-auth .af-auth-input { border-radius: 0.9rem; }

.af-auth-input-wrap { position: relative; margin-top: 0.25rem; }

.af-auth-input-wrap .af-auth-input {
    margin-top: 0;
    padding-inline-start: 2.6rem;
}

.af-auth-input-wrap .af-auth-input[type="password"] { padding-inline-end: 2.6rem; }

.af-auth-icon {
    position: absolute;
    inset-inline-start: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #94a3b8;
    pointer-events: none;
}

.af-auth-eye {
    position: absolute;
    inset-inline-end: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #94a3b8;
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 9999px;
    padding: 0;
}

.af-auth-eye:hover { color: #e2e8f0; }

.af-auth-eye-svg { width: 1.25rem; height: 1.25rem; }

.af-auth-hint { margin-top: 0.25rem; font-size: 0.75rem; color: #94a3b8; }

.af-auth-referral { margin-bottom: 1rem; font-size: 0.875rem; color: #cbd5e1; }

.af-auth-resend { margin-top: 1rem; text-align: center; font-size: 0.875rem; }

.af-auth-resend a { color: #7db4ff; }

/* --- Boutons de la carte --- */
.af-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45);
}

.af-auth-btn:hover { filter: brightness(1.08); }

.af-auth-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
}

.af-auth-or::before,
.af-auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.35);
}

.af-auth-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    background: #ffffff;
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(2, 8, 23, 0.25);
}

.af-auth-btn-google:hover { filter: brightness(0.97); }

.af-google-g { width: 1.35rem; height: 1.35rem; flex: none; }

.af-auth-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #93c5fd;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
}

.af-auth-btn-outline:hover { border-color: rgba(147, 197, 253, 0.8); }

html[data-theme="light"] .af-auth-btn-outline { color: #2563eb; border-color: #bfdbfe; }

/* --- Écran « Connexion réussie » --- */
.af-success { text-align: center; }

.af-success-check {
    width: 96px;
    height: 96px;
    margin: 0.5rem auto 1.25rem;
    color: #d4af37;
    animation: af-pop 0.45s ease-out;
}

.af-success-check svg { width: 100%; height: 100%; }

.af-success-email { color: #94a3b8; margin: 0 0 1.5rem; }

/* ================================================================
   BAS DE TIROIR (2026-11-22, GO de Badra)
   Invité : Connexion / Inscription en bas, côte à côte.
   Connecté : carte « Solde disponible » sous le nom, bouton
   bleu « Ajouter du solde » sous le bloc COMPTE.
   Le tiroir SUIT LE THÈME (2026-11-22, précision de Badra) :
   fond, textes et liens passent par les variables --af-*
   (sombre : carte #0d2440, texte #dbe6f5 ; clair : carte
   #ffffff, texte #1f2937) — jamais de blanc/noir en dur pour
   l'UI neutre. Seules la carte solde et le bouton bleu sont
   des accents volontaires, identiques dans les deux thèmes
   (dégradé bleu, texte blanc, comme sur la référence).
   ================================================================ */

/* --- Carte solde (connecté) : accent bleu, texte blanc --- */
.af-drawer-balance {
    margin: 12px 12px 0;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 14px;
    padding: 12px 16px;
    color: #ffffff;
}
.af-drawer-balance-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
.af-drawer-balance-amount {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #ffd700;
    margin-top: 2px;
}

/* --- Bouton bleu « Ajouter du solde » sous le bloc COMPTE --- */
.af-drawer-bottom { padding: 16px 12px 0; }
.af-drawer-add-balance { text-decoration: none; }

/* --- Connexion / Inscription en bas (invité), côte à côte ---
   Réutilise les boutons de la carte de connexion (.af-auth-btn
   bleu rempli, .af-auth-btn-outline contour) : ils suivent
   déjà le thème (contour bleu clair en sombre, bleu foncé en
   clair), donc aucune couleur forcée ici. */
.af-drawer-auth {
    display: flex;
    gap: 10px;
    padding: 16px 12px 28px;
}
.af-drawer-auth .af-auth-btn,
.af-drawer-auth .af-auth-btn-outline { flex: 1; margin-top: 0; text-decoration: none; }

/* ================================================================
   TIROIR BAS 2 (2026-11-22, correctif)
   Les boutons du bas doivent être collés EN BAS du tiroir,
   pas juste sous le dernier bloc : le tiroir devient un
   conteneur flex colonne (hauteur 100 %, défilement gardé) et
   le dernier élément absorbe l'espace libre (margin-top:auto).
   Invité : .af-drawer-auth (Connexion / Inscription).
   Connecté : .af-drawer-logout-form (Déconnexion) — le bouton
   « Ajouter du solde » juste au-dessus descend avec lui.
   Quand le contenu déborde, tout suit normalement le flux.
   Aucune couleur touchée : les deux thèmes fonctionnent
   comme avant. Les enfants ne rétrécissent pas (flex:none).
   ================================================================ */
.af-drawer { display: flex; flex-direction: column; }
.af-drawer > * { flex: none; }
.af-drawer-auth { margin-top: auto; }
.af-drawer-logout-form { margin-top: auto; }
.af-drawer-add-balance { box-sizing: border-box; }

/* ================================================================
   PORTEFEUILLE (2026-11-22, refonte « Ajouter du solde »)
   Mise en forme de la page /portefeuille comme la référence
   de Badra : pastilles, carte solde bleue, cartes de mode de
   paiement sélectionnables, montant + montants rapides,
   récapitulatif. Couleurs neutres uniquement via --af-* :
   les deux thèmes (sombre / clair) fonctionnent. Seules la
   carte solde et le bouton bleu sont des accents volontaires,
   identiques dans les deux thèmes (comme la carte solde du
   tiroir). En RTL, les flex se retournent seuls ; la flèche
   « Continuer » est retournée en CSS.
   ================================================================ */
.af-wallet { max-width: 680px; margin: 0 auto; padding: 16px 12px 32px; }
.af-wallet-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.af-wallet-status { background: var(--af-card); border: 1px solid var(--af-card-border); color: var(--af-text); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }

/* --- Pastilles de navigation --- */
.af-wallet-pills { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.af-wallet-pills::-webkit-scrollbar { display: none; }
.af-wallet-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 13px; border-radius: 9999px; border: 1px solid var(--af-card-border); background: var(--af-card); color: var(--af-text); font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; }
.af-wallet-pill svg { width: 16px; height: 16px; flex: none; }
.af-wallet-pill--active { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); color: #ffffff; border-color: transparent; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4); }

/* --- Carte solde (accent bleu, comme celle du tiroir) --- */
.af-wallet-balance { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); border-radius: 18px; padding: 18px 20px; color: #ffffff; }
.af-wallet-balance-title { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.af-wallet-balance-label { display: block; margin-top: 14px; color: rgba(255, 255, 255, 0.9); }
.af-wallet-balance-amount { display: block; font-size: 38px; font-weight: 800; line-height: 1.1; color: #ffd700; }

/* --- Cartes génériques --- */
.af-wallet-card { background: var(--af-card); border: 1px solid var(--af-card-border); border-radius: var(--af-radius); padding: 18px; margin-top: 16px; }
.af-wallet-card-title { color: var(--af-title); font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.af-wallet-note { color: var(--af-muted); font-size: 14px; margin: 12px 2px 0; }
.af-wallet-muted { color: var(--af-muted); }

/* --- Modes de paiement --- */
.af-wallet-method { display: flex; align-items: center; gap: 12px; border: 1px solid var(--af-card-border); border-radius: 14px; padding: 14px; cursor: pointer; margin-top: 10px; position: relative; }
.af-wallet-method input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.af-wallet-method--selected, .af-wallet-method:has(input:checked) { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }
.af-wallet-method--disabled { opacity: 0.65; cursor: not-allowed; }
.af-wallet-method-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 800; font-size: 22px; }
.af-wallet-method-icon--wave { background: #1dc3ff; color: #ffffff; }
.af-wallet-method-icon--binance { background: #f0b90b; color: #1e2026; }
.af-wallet-method-icon--generic { background: var(--af-bg2); color: var(--af-muted); border: 1px solid var(--af-card-border); }
.af-wallet-method-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.af-wallet-method-name { color: var(--af-title); font-weight: 700; }
.af-wallet-method-badge { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 9999px; background: rgba(37, 99, 235, 0.16); color: #60a5fa; font-size: 12px; font-weight: 700; }
.af-wallet-method-badge--soon { background: var(--af-bg2); color: var(--af-muted); }
.af-wallet-method-currency { color: var(--af-muted); font-size: 14px; margin-top: 4px; }
.af-wallet-method-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--af-muted); flex: none; display: flex; align-items: center; justify-content: center; }
.af-wallet-method-radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: transparent; }
.af-wallet-method--selected .af-wallet-method-radio, .af-wallet-method:has(input:checked) .af-wallet-method-radio { border-color: #3b82f6; }
.af-wallet-method--selected .af-wallet-method-radio::after, .af-wallet-method:has(input:checked) .af-wallet-method-radio::after { background: #3b82f6; }

/* --- Montant + montants rapides --- */
.af-wallet-amount { margin-top: 18px; }
.af-wallet-amount > label { display: block; color: var(--af-muted); font-size: 14px; font-weight: 600; text-align: center; }
.af-wallet-amount-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--af-card-border); border-radius: 14px; padding: 10px 16px; margin-top: 8px; }
.af-wallet-amount-plus { color: var(--af-muted); font-size: 22px; font-weight: 700; }
.af-wallet-amount-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--af-title); font-size: 28px; font-weight: 700; }
.af-wallet-amount-input input::-webkit-outer-spin-button, .af-wallet-amount-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.af-wallet-amount-input input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.af-wallet-amount-currency { color: var(--af-muted); font-weight: 700; }
.af-wallet-min { color: var(--af-muted); font-size: 13px; text-align: center; margin: 8px 0 0; }
.af-wallet-quick { display: flex; gap: 10px; margin-top: 12px; }
.af-wallet-quick-btn { flex: 1; min-width: 0; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--af-card-border); background: var(--af-card); color: var(--af-text); font-weight: 700; cursor: pointer; }
.af-wallet-quick-btn:hover { border-color: #3b82f6; }
.af-wallet-quick-btn--active { border-color: #3b82f6; color: #3b82f6; }

/* --- Récapitulatif --- */
.af-wallet-recap-balance { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); border-radius: 14px; padding: 14px 16px; color: #ffffff; margin-bottom: 8px; }
.af-wallet-recap-balance-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.af-wallet-recap-balance-amount { display: block; font-size: 26px; font-weight: 800; color: #ffffff; margin-top: 2px; }
.af-wallet-recap-after { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.35); font-size: 14px; color: rgba(255, 255, 255, 0.92); }
.af-wallet-recap-after span:last-child { font-weight: 700; }
.af-wallet-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; color: var(--af-text); }
.af-wallet-row--total { font-weight: 800; color: var(--af-title); border-top: 1px dashed var(--af-card-border); }
.af-wallet-continue { margin-top: 14px; }
.af-wallet-continue-arrow { display: inline-block; }
[dir="rtl"] .af-wallet-continue-arrow { transform: scaleX(-1); }
.af-wallet-secure { display: flex; gap: 10px; color: var(--af-muted); font-size: 14px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--af-card-border); }
.af-wallet-secure svg { color: var(--af-green); flex: none; margin-top: 2px; }

/* --- Dépôts + journal --- */
.af-wallet-list { list-style: none; margin: 0; padding: 0; }
.af-wallet-list-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 2px; border-top: 1px solid var(--af-card-border); color: var(--af-text); font-size: 14px; }
.af-wallet-list-item:first-child { border-top: 0; }
.af-wallet-list-actions { display: inline-flex; gap: 8px; align-items: center; }
.af-wallet-link { color: var(--af-cyan); }
.af-wallet-inline-form { display: inline; }
.af-wallet-table-wrap { overflow-x: auto; }
.af-wallet-table { min-width: 100%; font-size: 14px; color: var(--af-text); border-collapse: collapse; }
.af-wallet-table th { text-align: start; color: var(--af-muted); padding: 8px 12px; font-weight: 600; }
.af-wallet-table td { padding: 8px 12px; border-top: 1px solid var(--af-card-border); vertical-align: top; }
.af-wallet-pagination { margin-top: 16px; }

/* --- Thème clair : badge vert lisible --- */
html[data-theme="light"] .af-wallet-method-badge { color: #1d4ed8; background: #dbeafe; }
html[data-theme="light"] .af-wallet-method-badge--soon { color: #6b7280; background: #f3f4f6; }
.af-wallet-method-icon--cinetpay { background: #f97316; color: #ffffff; }

/* --- Badges opérateurs MoneyFusion (texte + CSS seulement,
       pas d'image externe) : remplacent l'icône carte générique
       sur la carte MoneyFusion. --- */
.af-wallet-method-operators { display: flex; flex-direction: column; gap: 4px; flex: none; }
.af-operator { display: inline-block; padding: 3px 10px; border-radius: 9999px; font-size: 11px; font-weight: 800; line-height: 1.6; color: #ffffff; text-align: center; }
.af-operator--orange { background: #ff7900; }
.af-operator--moov { background: #005baa; }
.af-operator--wave { background: #1dc8ff; }

/* --- Téléphone MoneyFusion (champ affiché seulement quand
       MoneyFusion est choisie) --- */
.af-wallet-phone { margin-top: 18px; }
.af-wallet-phone > label { display: block; color: var(--af-muted); font-size: 14px; font-weight: 600; text-align: center; }
.af-wallet-phone input { width: 100%; background: transparent; border: 1px solid var(--af-card-border); border-radius: 14px; padding: 10px 16px; margin-top: 8px; color: var(--af-title); font-size: 18px; font-weight: 600; outline: none; }
.af-wallet-phone input:focus { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }

/* --- Logo de la boutique (Admin → Réglages → Référencement) :
       image envoyée, ou texte en deux parties avec une couleur
       par partie et un style de police. --- */
.af-logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.af-logo-img { max-height: 44px; width: auto; display: block; border-radius: 8px; }
.af-logo-custom { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: .5px; text-decoration: none; white-space: nowrap; }

/* ================================================================
   iOS 26 — VERRE FLOTTANT PARTOUT DANS LA BOUTIQUE (2026-11-22)
   Même look que les cartes de /login et /register : verre
   translucide aux coins très arrondis, flouté, ombre douce,
   reflet en haut. S'applique à TOUTES les pages côté client
   (accueil, boutique, détail service, portefeuille, suivi,
   profil, tableau de bord, pages invité) dans les deux thèmes
   et en FR/EN/AR (aucune propriété directionnelle ici : le RTL
   se retourne seul, sauf le chevron des cartes commandes).
   L'admin (.af-admin-zone) est exclu : il ne change pas.
   L'identité alitelflach reste : fond bleu nuit en sombre,
   accents dorés, prix en pastille verte.
   ================================================================ */

/* Variables verre (mêmes valeurs que la carte de connexion). */
html[data-theme="dark"] {
    --af-glass-bg: linear-gradient(160deg, rgba(28, 58, 102, 0.66) 0%, rgba(13, 36, 64, 0.78) 100%);
    --af-glass-border: rgba(255, 255, 255, 0.16);
    --af-glass-shadow: 0 24px 60px rgba(2, 8, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
html[data-theme="light"] {
    --af-glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.85) 0%, rgba(226, 232, 240, 0.8) 100%);
    --af-glass-border: rgba(255, 255, 255, 0.7);
    --af-glass-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Verre flottant partagé : classe utilitaire + toutes les
   surfaces de cartes côté client.
   - .af-glass : classe à poser sur une carte.
   - Cartes Breeze de la zone connectée client (tableau de bord,
     profil, historique, revendeur, notifications, tickets) :
     .af-app main .bg-white, hors admin. Spécificité (0,4,2),
     supérieure à l'ancienne règle sombre (0,2,1) et égale à
     l'ancienne règle claire (0,4,2) mais placée après : elle gagne.
   - Pages invité de la boutique (suivi public, page invité) :
     .af-body .bg-white. L'en-tête (header.bg-white, hors <main>)
     n'est pas touché.
   - Panneaux maison : .af-detail (détail service + suivi),
     .af-panel (pages simples), .af-wallet-card (portefeuille). */
.af-glass,
html[data-theme="dark"] .af-app:not(.af-admin-zone) main .bg-white,
html[data-theme="light"] .af-app:not(.af-admin-zone) main .bg-white,
html[data-theme="dark"] .af-body .bg-white,
html[data-theme="light"] .af-body .bg-white,
.af-detail,
.af-panel,
.af-wallet-card {
    background: var(--af-glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid var(--af-glass-border);
    border-radius: 24px;
    box-shadow: var(--af-glass-shadow);
}

/* Variantes claires des surfaces retouchées plus haut (les
   règles claires de la section THÈME CLAIR sont plus anciennes :
   celles-ci, placées après, gagnent à spécificité égale). */
html[data-theme="light"] .af-float-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.85) 0%, rgba(226, 232, 240, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html[data-theme="light"] .af-search input {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .af-chip {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.85) 0%, rgba(226, 232, 240, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.7);
}

/* ---------- Historique des commandes : cartes appuyables ---------- */
/* Remplace le tableau coupé sur téléphone (2026-11-22) : une carte
   par commande, mobile-first, rien de tronqué ; toute la carte est
   un lien vers le détail / la page de suivi de la commande. */
.af-orders-title {
    color: var(--af-title);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}
.af-order-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    margin-top: 12px;
    text-decoration: none;
    color: var(--af-text);
    background: var(--af-glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid var(--af-glass-border);
    border-radius: 20px;
    box-shadow: var(--af-glass-shadow);
}
.af-order-card:first-of-type { margin-top: 0; }
.af-order-card:hover { filter: brightness(1.06); }
.af-order-card:active { transform: scale(0.99); }
.af-order-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.af-order-card-ref {
    color: var(--af-title);
    font-weight: 800;
    font-size: 15px;
    overflow-wrap: anywhere;
}
.af-order-card-service {
    color: var(--af-muted);
    font-size: 13px;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.af-order-card-date { color: var(--af-muted); font-size: 12px; }
.af-order-card-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: end;
}
.af-order-card-amount {
    color: var(--af-title);
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
}
.af-order-card-code {
    color: var(--af-muted);
    font-size: 12px;
    max-width: 180px;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.af-order-card-refunded { color: var(--af-muted); font-size: 12px; }
.af-order-card-chevron {
    flex: none;
    color: var(--af-muted);
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}
html[dir="rtl"] .af-order-card-chevron { transform: scaleX(-1); }

/* ==========================================================================
   REFONTE BLEUE 2026-11-26 - or remplace par du bleu, fond gris anthracite
   + traits dores qui defilent dans toute la boutique.
   Les accents or deviennent bleus partout (variables globales).
   ========================================================================== */

/* Or -> bleu : variables globales. */
:root {
    --af-gold: #2563eb;
    --af-gold-bright: #60a5fa;
    --af-gold-dark: #1d4ed8;
    --af-blue1: #60a5fa;
    --af-blue2: #2563eb;
    --af-blue3: #1d4ed8;
    --af-blue-glow: rgba(37, 99, 235, 0.38);
}

html[data-theme="dark"] {
    --af-bg1: #191c21;
    --af-bg2: #23272d;
    --af-bg3: #2b3037;
    --af-card: #1f2329;
    --af-card-border: #3a4048;
    --af-title: #ffffff;
    --af-text: #eef0f3;
    --af-muted: #a2aab5;
    --af-glass-bg: linear-gradient(160deg, rgba(58, 64, 72, 0.62) 0%, rgba(31, 35, 41, 0.82) 100%);
    --af-glass-border: rgba(255, 255, 255, 0.14);
    --af-glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Fond gris avec halo en haut de page. */
html[data-theme="dark"] .af-body {
    position: relative;
    background:
        radial-gradient(1100px 520px at 50% -8%, #2b3037 0%, rgba(43, 48, 55, 0) 62%),
        linear-gradient(180deg, #191c21 0%, #23272d 46%, #2b3037 100%);
    background-attachment: scroll;
}
html[data-theme="dark"] .af-header {
    background: rgba(24, 27, 32, 0.72);
    border-bottom-color: #3a4048;
}
html[data-theme="dark"] .af-search input {
    background: rgba(31, 35, 41, 0.72);
    border-color: rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .af-search input:focus { border-color: var(--af-blue2); }
html[data-theme="dark"] .af-body .af-card-inner {
    background: linear-gradient(160deg, #2b3036 0%, #20242a 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .af-body .af-float-card {
    background: linear-gradient(160deg, rgba(58, 64, 72, 0.66) 0%, rgba(31, 35, 41, 0.82) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .af-body .af-chip {
    background: rgba(34, 38, 44, 0.9);
    border-color: #3a4048;
}

/* ---------- Boutons dores -> bleus ---------- */
.af-btn-gold {
    background: linear-gradient(180deg, var(--af-blue1) 0%, var(--af-blue2) 55%, var(--af-blue3) 100%);
    color: #ffffff;
    box-shadow: 0 2px 12px var(--af-blue-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.af-btn-gold:hover { filter: brightness(1.08); }
.af-btn-ghost {
    color: var(--af-blue1);
    border-color: var(--af-blue2);
    background: rgba(37, 99, 235, 0.07);
}
.af-btn-ghost:hover { background: rgba(37, 99, 235, 0.16); }
.af-app .bg-gray-800, .af-guest .bg-gray-800 {
    background: linear-gradient(180deg, var(--af-blue1) 0%, var(--af-blue2) 55%, var(--af-blue3) 100%);
    color: #ffffff;
    border-color: var(--af-blue3);
}
.af-chip-active {
    background: linear-gradient(180deg, var(--af-blue1) 0%, var(--af-blue2) 55%, var(--af-blue3) 100%);
    border-color: var(--af-blue2);
    color: #ffffff;
}
html[data-theme="light"] .af-btn-ghost {
    color: var(--af-blue3);
    border-color: var(--af-blue2);
}

/* ---------- Ecriture et details dores -> bleus ---------- */
.af-app .bg-indigo-50 { background-color: rgba(37, 99, 235, 0.12); }
.af-app .text-indigo-600, .af-app .text-indigo-700 { color: #60a5fa; }
.af-app .border-indigo-400 { border-color: #2563eb; }
.af-app .focus\:border-indigo-700:focus { border-color: #2563eb; }
.af-app .hover\:border-gray-300:hover, .af-app .focus\:border-gray-300:focus { border-color: #2563eb; }
.af-side-links a.active { background: #2563eb; color: #ffffff; }
.af-badge-gold { background: #2563eb; color: #ffffff; }
.af-tab:hover { border-color: #2563eb; }
.af-tab.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    color: #ffffff;
}
.af-api-tab.active { border-bottom-color: #2563eb; }
.af-switch input:checked + .af-switch-slider { background: #2563eb; border-color: #2563eb; }
.af-switch input:focus-visible + .af-switch-slider { outline: 2px solid #2563eb; }
.af-success-check { color: #22c55e; } /* succes semantique : reste vert */
.af-btn-admin:hover { background: rgba(37, 99, 235, 0.12); }
@keyframes af-dot-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); } }

/* ---------- Traits dores qui defilent ---------- */
.af-tech-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.75;
}
.af-tech-lines::before,
.af-tech-lines::after {
    content: "";
    position: absolute;
    inset: -44px;
    will-change: transform;
}
.af-tech-lines::before {
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0 37px,
        rgba(212, 175, 55, 0.20) 37px 38px
    );
    animation: af-lines-y 9s linear infinite;
}
.af-tech-lines::after {
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0 37px,
        rgba(212, 175, 55, 0.10) 37px 38px
    );
    animation: af-lines-x 16s linear infinite;
}
@keyframes af-lines-y {
    from { transform: translateY(-38px); }
    to   { transform: translateY(0); }
}
@keyframes af-lines-x {
    from { transform: translateX(-38px); }
    to   { transform: translateX(0); }
}

.af-tech-lines .af-beam {
    position: absolute;
    left: -40%;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.9), transparent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
    animation: af-beam-x 7.5s linear infinite;
}
.af-tech-lines .af-beam.v {
    left: auto;
    top: -30%;
    width: 1px;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.7), transparent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
    animation: af-beam-y 11s linear infinite;
}
@keyframes af-beam-x {
    0%   { transform: translateX(0); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateX(360%); opacity: 0; }
}
@keyframes af-beam-y {
    0%   { transform: translateY(0); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateY(460%); opacity: 0; }
}

/* Le contenu passe au-dessus des traits (l'en-tete garde son z-index 95). */
.af-body > .af-wrap,
.af-body > .af-footer {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .af-tech-lines::before,
    .af-tech-lines::after,
    .af-tech-lines .af-beam {
        animation: none;
    }
}

/* Soldes en or -> bleus (tiroir lateral et page portefeuille). */
.af-drawer-balance-amount { color: #60a5fa; }
.af-wallet-balance-amount { color: #60a5fa; }
