/* ==========================================================================
   ULN RESTAURANT — Feuille de style globale
   Pages publiques : accueil, connexion, inscription.
   ========================================================================== */

:root {
    --uln-primary: #e8590c;
    --uln-primary-dark: #c2410c;
    --uln-primary-soft: #fff4ec;
    --uln-accent: #2f9e44;
    --uln-accent-soft: #ebfbee;
    --uln-dark: #212529;
    --uln-muted: #6c757d;
    --uln-bg: #faf7f2;
    --uln-surface: #ffffff;
    --uln-border: #ece4da;
    --uln-radius: 1rem;
    --uln-shadow: 0 10px 30px rgba(33, 37, 41, 0.08);
    --uln-shadow-sm: 0 4px 14px rgba(33, 37, 41, 0.06);
    --uln-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--uln-font);
    background-color: var(--uln-bg);
    color: var(--uln-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   Boutons et éléments de marque
   -------------------------------------------------------------------------- */

.btn-uln {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--uln-primary);
    --bs-btn-border-color: var(--uln-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--uln-primary-dark);
    --bs-btn-hover-border-color: var(--uln-primary-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--uln-primary-dark);
    --bs-btn-active-border-color: var(--uln-primary-dark);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--uln-primary);
    --bs-btn-disabled-border-color: var(--uln-primary);
    font-weight: 600;
    border-radius: 0.65rem;
}

.btn-uln-outline {
    --bs-btn-color: var(--uln-primary);
    --bs-btn-border-color: var(--uln-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--uln-primary);
    --bs-btn-hover-border-color: var(--uln-primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--uln-primary-dark);
    --bs-btn-active-border-color: var(--uln-primary-dark);
    font-weight: 600;
    border-radius: 0.65rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-decoration: none;
    color: var(--uln-dark);
}

.brand-logo img {
    height: 40px;
    width: auto;
}

@media (max-width: 575.98px) {
    .brand-logo img {
        height: 30px;
    }
}

.brand-logo .brand-text small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--uln-primary);
}

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

.bg-uln-soft {
    background-color: var(--uln-primary-soft) !important;
}

.badge-role {
    background: var(--uln-primary-soft);
    color: var(--uln-primary-dark);
    font-weight: 600;
    border: 1px solid #ffd8bf;
    border-radius: 999px;
    padding: 0.35em 0.8em;
}

/* --------------------------------------------------------------------------
   Barre de navigation publique
   -------------------------------------------------------------------------- */

.navbar-uln {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--uln-border);
}

.navbar-uln .nav-link {
    color: var(--uln-dark);
    font-weight: 500;
}

.navbar-uln .nav-link:hover {
    color: var(--uln-primary);
}

/* --------------------------------------------------------------------------
   Section héro (page d'accueil)
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    color: #fff;
    background:
        linear-gradient(100deg, rgba(24, 14, 4, 0.88) 0%, rgba(24, 14, 4, 0.55) 45%, rgba(24, 14, 4, 0.25) 100%),
        url("../assets/images/hero-cantine.png") center / cover no-repeat;
    min-height: 78vh;
    display: flex;
    align-items: center;
}

.hero .hero-content {
    max-width: 620px;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.12;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.88);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(232, 89, 12, 0.92);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.hero-feature .icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffc078;
}

/* --------------------------------------------------------------------------
   Sections et cartes de présentation
   -------------------------------------------------------------------------- */

.section-title {
    font-weight: 800;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.section-subtitle {
    color: var(--uln-muted);
}

.feature-card {
    background: var(--uln-surface);
    border: 1px solid var(--uln-border);
    border-radius: var(--uln-radius);
    box-shadow: var(--uln-shadow-sm);
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--uln-shadow);
}

.feature-card .feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.9rem;
    background: var(--uln-primary-soft);
    color: var(--uln-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step-card {
    background: var(--uln-surface);
    border: 1px solid var(--uln-border);
    border-radius: var(--uln-radius);
    padding: 1.4rem;
    height: 100%;
    position: relative;
}

.step-card .step-number {
    position: absolute;
    top: -16px;
    left: 1.2rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--uln-primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(232, 89, 12, 0.4);
}

/* --------------------------------------------------------------------------
   Pages d'authentification (connexion, inscription)
   -------------------------------------------------------------------------- */

.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.auth-card {
    background: var(--uln-surface);
    border: 1px solid var(--uln-border);
    border-radius: 1.25rem;
    box-shadow: var(--uln-shadow);
    width: 100%;
    max-width: 480px;
    padding: 2.25rem;
}

.auth-card .auth-icon {
    width: 62px;
    height: 62px;
    border-radius: 1.1rem;
    background: var(--uln-primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-card .auth-icon img {
    width: 38px;
    height: 38px;
}

.auth-card h1 {
    font-size: 1.45rem;
    font-weight: 800;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border-radius: 0.65rem;
    border-color: #dee2e6;
    padding: 0.6rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--uln-primary);
    box-shadow: 0 0 0 0.22rem rgba(232, 89, 12, 0.15);
}

.input-group-text {
    border-radius: 0.65rem;
    background: #f8f9fa;
}

.auth-footer {
    color: var(--uln-muted);
    font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.footer-uln {
    background: #1c1712;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    padding: 1.6rem 0;
    margin-top: auto;
}

.footer-uln a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-uln a:hover {
    color: #ffc078;
}

/* --------------------------------------------------------------------------
   Notifications (toasts) et états
   -------------------------------------------------------------------------- */

.toast-container-uln {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(92vw, 400px);
}

.toast-uln {
    border-radius: 0.8rem;
    box-shadow: var(--uln-shadow);
    overflow: hidden;
}

.state-placeholder {
    text-align: center;
    color: var(--uln-muted);
    padding: 3rem 1rem;
}

.state-placeholder .state-icon {
    font-size: 3rem;
    color: #d5cabd;
    display: block;
    margin-bottom: 0.75rem;
}

.spinner-border.text-uln {
    color: var(--uln-primary) !important;
}

.skeleton {
    background: linear-gradient(90deg, #efe8df 25%, #f7f2ea 50%, #efe8df 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
    border-radius: 0.6rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Accessibilité et responsive
   -------------------------------------------------------------------------- */

:focus-visible {
    outline: 3px solid rgba(232, 89, 12, 0.5);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem;
    }

    .hero {
        min-height: 68vh;
        text-align: center;
    }

    .hero .hero-content {
        margin: 0 auto;
    }

    .hero-feature {
        justify-content: center;
    }
}
