html { scroll-behavior: smooth; }

body {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef3 50%, #dfe7ed 100%);
    background-attachment: fixed;
}

.glass-effect {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.8s ease-out; }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slide-in-up { animation: slideInUp 0.6s ease-out forwards; }

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.counter-number {
    display: inline-block;
    animation: countUp 0.8s ease-out forwards;
    font-variant-numeric: tabular-nums;
}
.stat-value { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-backdrop { background-color: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* ═══════════ LAYOUT FIXE ═══════════ */
#public-header {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 9999 !important;
}

#public-footer {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    z-index: 9998 !important;
}

/* Zone de contenu entre header et footer */
#public-content {
    padding-top: 4.5rem;   /* hauteur du header (h-16 = 4rem + marge) */
    padding-bottom: 3rem;  /* hauteur du footer réduit */
    min-height: 100vh;
    overflow-y: auto;
}

#public-page-content {
    transition: opacity 0.18s ease;
}

/* ═══════════ LOADER ═══════════ */
#public-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}
#public-loader.hidden { display: none !important; }

.public-spinner {
    width: 48px; height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.public-progress {
    width: 180px; height: 3px;
    background: #e5e7eb; border-radius: 2px; overflow: hidden;
}
.public-progress-bar {
    height: 100%;
    background: linear-gradient(90deg,#3b82f6,#8b5cf6);
    border-radius: 2px;
    animation: progress-public 1.2s ease-in-out infinite;
}
@keyframes progress-public { 0%{width:0} 60%{width:75%} 100%{width:100%} }

/* Active nav link */
.public-nav-link.active {
    color: #2563eb !important;
    font-weight: 600;
}

