/* ============================================================
   E-SHULE EVAC — PUBLIC SITE STYLES
   Couleurs LINKS SOLUTIONS : Bleu marine + Rouge bordeaux + Or
   ============================================================ */

:root {
    --primary: #1B2D5C;
    --primary-dark: #0F1E3F;
    --primary-light: #2A4373;
    --secondary: #A8202B;
    --secondary-light: #C72D3A;
    --accent: #D4A847;
    --accent-light: #E5BC6A;

    --bg: #F8FAFD;
    --card: #FFFFFF;
    --border: #E5E9F0;
    --text: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow: 0 8px 24px rgba(11,28,69,0.08);
    --shadow-lg: 0 20px 50px rgba(11,28,69,0.12);

    --radius: 12px;
    --radius-lg: 20px;
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #0F1729;
    --card: #1A2438;
    --border: #2A3A56;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-light: #64748B;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.public-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding-top: 80px;
    transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-public {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid transparent;
    padding: 16px 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar-public {
    background: rgba(15, 23, 41, 0.85);
}

.navbar-public.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--border);
    padding: 10px 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(27,45,92,0.3);
    position: relative;
    overflow: hidden;
}

.brand-icon::after {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 60%; height: 100%;
    background: var(--accent);
    transform: rotate(45deg);
    opacity: 0.7;
}

.brand-icon-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.brand-text {
    display: flex; align-items: center; gap: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
}

.brand-evac {
    background: var(--secondary);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    font-size: 14.5px;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(27,45,92,0.05);
    color: var(--primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
    background: rgba(27,45,92,0.08);
    font-weight: 600;
}

.btn-theme-toggle {
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-theme-toggle:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.nav-actions .btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 8px;
}
.nav-actions .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.nav-actions .btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border: none;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(168,32,43,0.3);
}
.nav-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(168,32,43,0.4);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    padding: 80px 0 100px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(27,45,92,0.06), transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(168,32,43,0.06), transparent 50%),
        var(--bg);
}

.hero-grid-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(27,45,92,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27,45,92,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(212,168,71,0.15), rgba(168,32,43,0.1));
    color: var(--secondary);
    border: 1px solid rgba(212,168,71,0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-badge .badge-dot {
    width: 6px; height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 0 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(27,45,92,0.25);
    transition: all 0.3s;
}
.btn-hero-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(27,45,92,0.35);
}

.btn-hero-secondary {
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    padding: 12.5px 26px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-trust-item i {
    color: #10B981;
    font-size: 14px;
}

/* Mockup dashboard à droite */
.hero-mockup {
    position: relative;
    perspective: 1500px;
}

.dashboard-mockup {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s;
}

.dashboard-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.dashboard-mockup-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-traffic-lights {
    display: flex; gap: 6px;
}
.dashboard-traffic-lights span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}
.dashboard-traffic-lights span:nth-child(1) { background: #FF5F57; }
.dashboard-traffic-lights span:nth-child(2) { background: #FEBC2E; }
.dashboard-traffic-lights span:nth-child(3) { background: #27C840; }

.dashboard-content {
    padding: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.dashboard-stat {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}
.dashboard-stat:nth-child(2) { border-left-color: var(--secondary); }
.dashboard-stat:nth-child(3) { border-left-color: var(--accent); }

.dashboard-stat-value {
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
}
.dashboard-stat:nth-child(2) .dashboard-stat-value { color: var(--secondary); }
.dashboard-stat:nth-child(3) .dashboard-stat-value { color: var(--accent); }
.dashboard-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dashboard-chart {
    height: 120px;
    background: linear-gradient(135deg, rgba(27,45,92,0.05), rgba(168,32,43,0.05));
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    gap: 6px;
}
.dashboard-chart .bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
}
.dashboard-chart .bar:nth-child(even) {
    background: linear-gradient(180deg, var(--secondary), var(--secondary-light));
}

/* Floating cards */
.float-card {
    position: absolute;
    background: var(--card);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.float-card-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff;
}

.float-card-1 {
    top: -10px; left: -30px;
    animation: float 6s ease-in-out infinite;
}
.float-card-1 .float-card-icon { background: #10B981; }

.float-card-2 {
    bottom: 40px; right: -20px;
    animation: float 6s ease-in-out infinite 2s;
}
.float-card-2 .float-card-icon { background: var(--secondary); }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================================
   SECTION COMMUNES
   ============================================================ */
.section {
    padding: 90px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 13px;
    margin-bottom: 12px;
}

.section-heading {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-description {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(27,45,92,0.25);
}

.feature-card:nth-child(2) .feature-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); box-shadow: 0 8px 20px rgba(168,32,43,0.25); }
.feature-card:nth-child(3) .feature-icon { background: linear-gradient(135deg, var(--accent), var(--accent-light)); box-shadow: 0 8px 20px rgba(212,168,71,0.25); }
.feature-card:nth-child(5) .feature-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); box-shadow: 0 8px 20px rgba(168,32,43,0.25); }
.feature-card:nth-child(6) .feature-icon { background: linear-gradient(135deg, var(--accent), var(--accent-light)); box-shadow: 0 8px 20px rgba(212,168,71,0.25); }

.feature-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-description {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(212,168,71,0.15), transparent 60%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    position: relative;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-value {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 4px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================================
   PORTALS SECTION (Multi-rôles)
   ============================================================ */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.portal-card {
    background: var(--card);
    padding: 28px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

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

.portal-icon {
    width: 70px; height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 28px;
}

.portal-card:nth-child(2) .portal-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); }
.portal-card:nth-child(3) .portal-icon { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.portal-card:nth-child(4) .portal-icon { background: linear-gradient(135deg, #10B981, #34D399); }
.portal-card:nth-child(5) .portal-icon { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }

.portal-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 8px;
}

.portal-description {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 70px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(212,168,71,0.15), transparent 60%);
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 60%; height: 150%;
    background: radial-gradient(circle, rgba(168,32,43,0.18), transparent 60%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
}

.cta-text {
    color: rgba(255,255,255,0.85);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 32px;
}

.btn-cta {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(212,168,71,0.4);
}

.btn-cta:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(212,168,71,0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-public {
    background: var(--primary-dark);
    color: #94A3B8;
    padding: 60px 0 0;
    margin-top: 0;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: #94A3B8;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-contact li {
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-contact i {
    color: var(--accent);
    width: 16px;
}

.social-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.social-icon:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    margin-top: 40px;
    font-size: 13px;
    color: #94A3B8;
}

.text-light-50 { color: rgba(255,255,255,0.65); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    body.public-body { padding-top: 70px; }
    .hero-section { padding: 50px 0 70px; }
    .section { padding: 60px 0; }
    .hero-mockup { display: none; }
    .float-card { display: none; }
    .nav-actions .btn { font-size: 13px; padding: 6px 12px; }
}
