/* ============================================================
   DELONE MINING SITE - CSS GLOBAL
   Playfair Display (titres) + Sora (corps)
   Thème : Jaune moutarde #F2C94C / Bleu marine #1F2A44
   ============================================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #2B2B2B;
    background-color: #FAFAFA;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0;
    line-height: 1.2;
}

p {
    margin: 0 0 1em;
}

ul, ol {
    padding-left: 1.5em;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: 'Sora', sans-serif;
}

input, textarea, select {
    font-family: 'Sora', sans-serif;
}

/* ---- VARIABLES CSS (Thème Delone) ---- */
:root {
    --color-primary: #F2C94C;
    --color-primary-dark: #E0B93D;
    --color-secondary: #1F2A44;
    --color-accent: #2D4F6C;
    --color-active: #1C3D5A;
    --color-bg: #FAFAFA;
    --color-bg-section: #E5E7EB;
    --color-text: #2B2B2B;
    --color-text-muted: #6B7280;
    --color-border: #CBD5E1;
    --color-success: #27AE60;
    --color-error: #EB5757;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Sora', -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
    --nav-height: 70px;
    --container-max: 1200px;
}

/* ---- UTILITAIRES ---- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-muted {
    color: var(--color-text-muted);
}

.font-display {
    font-family: var(--font-display);
}

/* ---- BOUTONS GLOBAUX ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary-global {
    background: var(--color-primary);
    color: var(--color-secondary);
}

    .btn-primary-global:hover {
        background: var(--color-primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(242,201,76,0.35);
    }

.btn-secondary-global {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

    .btn-secondary-global:hover {
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

.btn-dark {
    background: var(--color-secondary);
    color: white;
}

    .btn-dark:hover {
        background: var(--color-accent);
        transform: translateY(-2px);
    }

/* ---- SCROLLBAR PERSONNALISÉE ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-accent);
    }

/* ---- SÉLECTION DE TEXTE ---- */
::selection {
    background: var(--color-primary);
    color: var(--color-secondary);
}

/* ---- BLAZOR ERROR UI ---- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ---- ANIMATIONS GLOBALES ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ---- SECTIONS COMMUNES ---- */
.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 48px 0;
}

/* Fond blanc */
.bg-white {
    background: white;
}
/* Fond gris clair */
.bg-light {
    background: #F8F9FA;
}
/* Fond marine */
.bg-dark {
    background: var(--color-secondary);
    color: white;
}
/* Fond jaune */
.bg-yellow {
    background: var(--color-primary);
}

/* ---- CARDS COMMUNES ---- */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

/* ---- BADGES ---- */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ---- RESPONSIVE BREAKPOINTS ---- */
/* Mobile first - les medias queries DOUBLENT le @ en Blazor (@@media) */
/* Dans ce fichier app.css standard, on utilise @media normalement */

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .section-padding {
        padding: 48px 0;
    }

    .container {
        padding: 0 16px;
    }
}

/* ---- LOADER ---- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---- SUPPRESSION DES STYLES MUD PAR DÉFAUT QUI CONFLICTENT ---- */
.mud-main-content {
    padding: 0 !important;
    min-height: 0 !important;
}

.mud-layout {
    overflow: visible !important;
}

/* Le focus posé par FocusOnNavigate après chaque navigation sert
   aux lecteurs d'écran. Il ne doit pas produire de liseré visible. */
[tabindex="-1"]:focus {
    outline: none;
}
