/* Refonte B2C Koorail — palette rouge / jaune */
:root {
    --primary-color: #d31119;
    --primary-hover: #b30e15;
    --brand-yellow: #f8c400;
    --brand-dark: #1f0507;
    --brand-soft: #fef2f2;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Anciennes classes orange -> rouge */
.bg-koorail-orange { background-color: #d31119 !important; }
.text-koorail-orange { color: #d31119 !important; }
.border-koorail-orange { border-color: #d31119 !important; }
.hover\:bg-koorail-orange:hover { background-color: #d31119 !important; }
.hover\:text-koorail-orange:hover { color: #d31119 !important; }
.hover\:border-koorail-orange:hover { border-color: #d31119 !important; }
.ring-koorail-orange { --tw-ring-color: #d31119 !important; }
.from-koorail-orange { --tw-gradient-from: #d31119 var(--tw-gradient-from-position); --tw-gradient-to: rgb(211 17 25 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-koorail-orange { --tw-gradient-to: #d31119 var(--tw-gradient-to-position); }

/* Accents Tailwind orange encore présents dans les pages B2C */
.bg-orange-50 { background-color: #fef2f2 !important; }
.bg-orange-100 { background-color: #fee2e2 !important; }
.bg-orange-500, .bg-orange-600 { background-color: #d31119 !important; }
.text-orange-500, .text-orange-600, .text-orange-700 { color: #d31119 !important; }
.border-orange-200, .border-orange-300 { border-color: #fecaca !important; }
.hover\:bg-orange-600:hover, .hover\:bg-orange-700:hover { background-color: #b30e15 !important; }

/* Focus / sélection */
:focus-visible {
    outline-color: #d31119;
}
::selection {
    background: #f8c400;
    color: #1f0507;
}

/* Barre de défilement */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #fef2f2; }
::-webkit-scrollbar-thumb { background: #d31119; border-radius: 9999px; }

/* Cartes produit */
.product-card {
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-card:hover {
    transform: translateY(-2px);
}

/* Bandeau flash */
.flash-countdown span {
    font-variant-numeric: tabular-nums;
}

/* Anciennes puces / badges */
.badge-primary { background-color: #d31119; border-color: #d31119; color: #fff; }
.btn-primary { background-color: #d31119 !important; border-color: #d31119 !important; color: #fff !important; }
.btn-primary:hover { background-color: #b30e15 !important; border-color: #b30e15 !important; }

/* Chat / bouton haut de page */
#scroll-top-btn, #chat-toggle { background-color: #d31119 !important; border-color: #d31119 !important; }

/* Survols orange résiduels */
.hover\:bg-orange-50:hover { background-color: #fef2f2 !important; }
.hover\:border-orange-400:hover { border-color: #d31119 !important; }
.border-orange-100 { border-color: #fee2e2 !important; }

/* =========================================================
   Système visuel commun aux pages intérieures (identité accueil)
   ========================================================= */
body {
    color: #18181b;
}
h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* Carte / panneau standard */
.card {
    border-radius: 1rem !important;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card-body {
    padding: 1.25rem;
}
.card-title {
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Anciens arrondis et ombres */
[class*="rounded-[32px]"], [class*="rounded-[24px]"], [class*="rounded-[20px]"] {
    border-radius: 1rem !important;
}
[class*="shadow-[0_4px_25px"], [class*="shadow-[0_8px_30px"] {
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
}

/* Formulaires */
.input, .select, .textarea {
    border-radius: .75rem !important;
    border-color: #d1d5db !important;
    background-color: #f9fafb !important;
    font-size: .875rem;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none !important;
    border-color: #d31119 !important;
    box-shadow: 0 0 0 3px rgba(211, 17, 25, .12) !important;
}
.label-text {
    font-size: .78rem;
    font-weight: 600;
    color: #374151;
}

/* Boutons */
.btn {
    border-radius: 9999px;
    font-weight: 700;
    text-transform: none;
}
.btn-primary {
    background-color: #d31119 !important;
    border-color: #d31119 !important;
    color: #fff !important;
}
.btn-primary:hover {
    background-color: #b30e15 !important;
    border-color: #b30e15 !important;
}
.btn-outline:hover {
    background-color: #fef2f2 !important;
    border-color: #d31119 !important;
    color: #d31119 !important;
}
.btn-ghost:hover {
    background-color: #fef2f2 !important;
    color: #d31119 !important;
}

/* Badges */
.badge {
    border-radius: 9999px;
    font-weight: 700;
}

/* Tableaux */
.table :where(thead th) {
    background: #f9fafb;
    color: #6b7280;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 800;
}
.table :where(tbody td) {
    font-size: .82rem;
    color: #374151;
    border-color: #f3f4f6;
}
.table :where(tbody tr:hover) {
    background: #fef2f2;
}

/* Alertes et séparateurs */
.alert {
    border-radius: .75rem;
}
.divider {
    color: #9ca3af;
}
.divider:before, .divider:after {
    background-color: #e5e7eb;
}

/* Liens et fils d'Ariane */
.kr-breadcrumb a:hover { color: #d31119; }

/* Petits utilitaires */
.kr-page-title {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 900;
    color: #18181b;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) {
    .kr-page-title { font-size: 1.875rem; line-height: 2.25rem; }
}
.kr-muted { color: #6b7280; }

/* Alertes dans la palette Koorail */
.alert-info {
    background-color: #fffbeb !important;
    border: 1px solid #f8c400 !important;
    color: #713f12 !important;
}
.alert-info i { color: #d31119 !important; }
.alert-error {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}
.alert-error i { color: #d31119 !important; }
.alert-warning {
    background-color: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #92400e !important;
}
.alert-success {
    background-color: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}
.link-primary { color: #d31119 !important; }
.link-primary:hover { color: #b30e15 !important; }
.tabs .tab-active, .tab-active {
    background-color: #d31119 !important;
    color: #fff !important;
    border-color: #d31119 !important;
}

/* Footer clair : contraste des liens */
footer {
    background-color: #F8F9FA;
    color: #18181b;
}
footer a {
    color: #4b5563;
}
footer a:hover {
    color: #d31119;
}
