[x-cloak], .masque-initial { display: none !important; }
/* Déport CSP : règle précédemment en <style> inline dans plateforme_web/index.html.
   style-src 'self' interdit le inline, donc elle vit ici (fichier externe autorisé). */
html { scroll-behavior: smooth; }
/* Animations de la hero section (identiques au React) */
@keyframes fade-in {
    0% { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in { animation: 1s ease-out fade-in; }
@keyframes slide-up {
    0% { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: 1s ease-out slide-up; }
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    to { transform: translate(0px, 0px) scale(1); }
}
.animate-blob { animation: 7s infinite blob; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }
/* Spinner du bouton de recherche de quittance : masque par defaut,
   affiche uniquement via la classe .montre ajoutee par le JS */
#spinnerRecherche { display: none !important; }
#spinnerRecherche.montre { display: inline-block !important; }
.sonatur-green {
    background-color: rgb(5 150 105);
}
.sonatur-green-hover:hover {
    background-color: rgb(5 150 105 / 0.8);
}
/* Styles améliorés pour l'écran de chargement */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2B6A39;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

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

.loader {
    width: 150px;
    height: 150px;
    border: 5px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1.5s linear infinite;
}

.loader-logo {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: loaderPulse 2s infinite;
    background-color: white;
}

.loading-text {
    color: white;
    font-size: 1.5rem;
    margin-top: 2rem;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.5s;
}

.loading-dots:after {
    content: '.';
    animation: dots 2s steps(5, end) infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loaderPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

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

@keyframes clignoteVertBlanc {
    0%, 100% {
        background-color: #2B6A39 !important;
        color: #ffffff !important;
        border-color: #2B6A39 !important;
        box-shadow: 0 0 0 4px rgba(43, 106, 57, 0.35) !important;
    }
    50% {
        background-color: #ffffff !important;
        color: #2B6A39 !important;
        border-color: #2B6A39 !important;
        box-shadow: 0 0 0 2px rgba(43, 106, 57, 0.15) !important;
    }
}

.stepper-active-step {
    border: 2.5px solid #2B6A39 !important;
    animation: clignoteVertBlanc 1s ease-in-out infinite !important;
}

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

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80% {
        content: '....';
    }
    100% {
        content: '.....';
    }
}

/* ==========================================================================
   SONATUR Branding & Header
   ========================================================================== */
.sonatur-nav-logo {
    height: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    max-width: 180px !important;
    object-fit: contain !important;
    display: inline-block !important;
}

/* ==========================================================================
   Pages d'Erreur (404, 500, 503, 403, 400) - 100% CSP Strict & Sans CDN
   ========================================================================== */
.error-illustration-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.error-icon-box {
    width: 104px !important;
    height: 104px !important;
    border-radius: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.error-icon-box:hover {
    transform: rotate(0deg) scale(1.05) !important;
}

.error-icon-box-emerald {
    background-color: #d1fae5 !important;
    border: 2px solid #6ee7b7 !important;
    color: #047857 !important;
    transform: rotate(-3deg);
}

.error-icon-box-red {
    background-color: #fee2e2 !important;
    border: 2px solid #fca5a5 !important;
    color: #dc2626 !important;
    transform: rotate(-3deg);
}

.error-icon-box-amber {
    background-color: #fef3c7 !important;
    border: 2px solid #fcd34d !important;
    color: #b45309 !important;
    transform: rotate(-3deg);
}

.error-icon-box-slate {
    background-color: #e2e8f0 !important;
    border: 2px solid #cbd5e1 !important;
    color: #334155 !important;
    transform: rotate(-3deg);
}

.error-svg-icon {
    width: 48px;
    height: 48px;
    display: block;
}

.error-badge-pill {
    position: absolute;
    bottom: -12px;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 16px !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    white-space: nowrap !important;
    z-index: 10;
}

.error-badge-emerald {
    background-color: #047857 !important;
    color: #ffffff !important;
}

.error-badge-red {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.error-badge-amber {
    background-color: #b45309 !important;
    color: #ffffff !important;
}

.error-badge-slate {
    background-color: #334155 !important;
    color: #ffffff !important;
}

.error-code-num {
    font-size: 4.5rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}

.error-code-emerald { color: #047857 !important; }
.error-code-red { color: #b91c1c !important; }
.error-code-amber { color: #b45309 !important; }
.error-code-slate { color: #1e293b !important; }

.error-title-text {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1rem !important;
}

.error-desc-text {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: #4b5563 !important;
    max-width: 580px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 2rem !important;
}

.error-actions-group {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 2.5rem !important;
}

.error-btn-base {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.error-btn-base svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.error-btn-primary {
    background-color: #059669 !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.error-btn-primary:hover {
    background-color: #047857 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.error-btn-secondary {
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.error-btn-secondary:hover {
    background-color: #f3f4f6 !important;
}

.error-btn-outline {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.error-btn-outline:hover {
    background-color: #d1fae5 !important;
}

.error-support-card {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    text-align: left !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

.error-support-icon-wrap {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background-color: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.error-support-icon-wrap svg {
    width: 20px;
    height: 20px;
}

.error-support-title {
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 4px !important;
}

.error-support-text {
    color: #4b5563 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* ==========================================================================
   Page de Connexion Administration — Pixel Perfect & Centrage Garanti
   ========================================================================== */
.admin-login-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #e6f9ed 50%, #dcfce7 100%);
    padding: 4rem 1.5rem;
    box-sizing: border-box;
    margin: 0;
}

.admin-login-box {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 1.5rem;
    box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.04);
    border: 1px solid #bbf7d0;
    padding: 3rem 2.5rem 3.25rem;
    box-sizing: border-box;
    margin-top: 2rem; /* Fait descendre la boîte pour un meilleur équilibre visuel */
}

.admin-login-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.admin-login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.admin-login-logo-badge {
    width: 88px;
    height: 88px;
    background: #ecfdf5;
    border: 2px solid #a7f3d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px -2px rgba(16, 185, 129, 0.15);
    padding: 0.5rem;
    box-sizing: border-box;
}

.admin-login-logo-badge img {
    height: 54px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.admin-login-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
}

.admin-login-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.admin-login-field {
    display: flex;
    flex-direction: column;
}

.admin-login-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    margin-bottom: 0.6rem;
}

.admin-login-label i {
    color: #059669;
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

.admin-login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.admin-login-input-group input {
    width: 100%;
    height: 3.1rem;
    padding-left: 2.85rem !important;
    padding-right: 2.85rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 0.75rem !important;
    font-size: 0.95rem !important;
    color: #1f2937 !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.admin-login-input-group input:focus {
    outline: none !important;
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18) !important;
}

.admin-login-input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-toggle-btn {
    position: absolute;
    right: 0.875rem;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    z-index: 5;
    background: none;
    border: none;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 0.375rem;
}

.admin-login-toggle-btn:hover {
    color: #374151;
}

.admin-login-actions {
    padding-top: 0.5rem;
}

.admin-login-btn {
    width: 100%;
    height: 3.15rem;
    background-color: #059669;
    color: #ffffff;
    padding: 0 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.28);
    transition: all 0.2s ease;
}

.admin-login-btn:hover {
    background-color: #047857;
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.38);
    transform: translateY(-1px);
}

.admin-login-btn:active {
    transform: translateY(0);
}

.admin-login-alert {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-width: 1px;
    border-style: solid;
    font-size: 0.875rem;
    line-height: 1.35;
}

.admin-login-alert.alert-error {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.admin-login-alert.alert-success {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

/* ==========================================================================
   Administration Navbar & Dropdowns
   ========================================================================== */
.dropdown-menu {
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.rotate-180 {
    transform: rotate(180deg);
}

/* ==========================================================================
   TomSelect Styles (Operations Form)
   ========================================================================== */
.ts-wrapper select[multiple] {
    display: none !important;
}

select:not([multiple]) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}
select:not([multiple]):focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.ts-wrapper.multi .ts-control {
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    min-height: 2.5rem;
}
.ts-wrapper.multi.focus .ts-control {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}
.ts-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
}
.ts-dropdown .option {
    padding: 0.5rem 0.75rem;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background-color: #f0fdf4;
    color: #166534;
}
.ts-dropdown .option.selected {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 500;
}
.ts-control .item {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 0.25rem;
    padding: 0.125rem 0.5rem;
    margin: 0.125rem;
}
.ts-control .item .remove {
    color: #15803d;
    border-left: 1px solid #bbf7d0;
}
.ts-control .item .remove:hover {
    background-color: #bbf7d0;
}




