/*
 * FIDELIS - Charte graphique
 * Couleur principale: #1A3D5C (bleu marine profond)
 * Couleur accent: #2FBFA0 (vert teal)
 * Couleur alerte: #F4A04B (orange)
 * Couleur urgence: #E05454 (rouge)
 * Fond: #F5F8FC (gris très clair)
 * Polices: Fraunces (titres), DM Sans (corps)
 */

:root {
    --primary: #1A3D5C;
    --accent: #2FBFA0;
    --alert: #F4A04B;
    --danger: #E05454;
    --bg: #F5F8FC;
    --white: #FFFFFF;
    --text: #2D3748;
    --text-light: #718096;
    --border: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    color: var(--primary);
}

/* Navbar */
.navbar-fidelis {
    background-color: var(--primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(26, 61, 92, 0.1);
}

.navbar-fidelis .navbar-brand {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--white) !important;
    text-decoration: none;
}

.navbar-fidelis .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-fidelis .nav-link:hover {
    color: var(--accent) !important;
}

.navbar-fidelis .nav-link.active {
    color: var(--white) !important;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(47, 191, 160, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(47, 191, 160, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-title .text-accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Buttons */
.btn-fidelis {
    padding: 0.875rem 2rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-fidelis-primary {
    background-color: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-fidelis-primary:hover {
    background-color: #2AA88C;
    border-color: #2AA88C;
    color: var(--white);
}

.btn-fidelis-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-fidelis-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

.btn-fidelis-white {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--white);
}

.btn-fidelis-white:hover {
    background-color: var(--bg);
    color: var(--primary);
}

/* Stats Section */
.stats-section {
    background-color: var(--white);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--primary);
}

.feature-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(26, 61, 92, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.feature-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Alerts Section */
.alerts-section {
    background-color: var(--primary);
    padding: 5rem 0;
    color: var(--white);
}

.alerts-section .section-title {
    color: var(--white);
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-item.blue {
    border-left-color: var(--accent);
}

.alert-item.orange {
    border-left-color: var(--alert);
}

.alert-item.red {
    border-left-color: var(--danger);
}

.alert-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: blink 2s infinite;
}

.alert-dot.blue {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.alert-dot.orange {
    background-color: var(--alert);
    box-shadow: 0 0 10px var(--alert);
}

.alert-dot.red {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.alert-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.alert-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* How It Works */
.how-it-works {
    padding: 5rem 0;
    background: var(--white);
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 auto 1.5rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.step-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    background: var(--primary);
    padding: 4rem 0;
    text-align: center;
}

.cta-title {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: var(--primary);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg);
    color: var(--primary);
}

.sidebar-nav a svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
}

.baby-info {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.baby-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.baby-age {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.baby-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Dashboard Content */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-light);
}

/* Cards */
.metric-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    height: 100%;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary);
}

.metric-subtext {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Chart Container */
.chart-container {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.chart-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Alert Cards */
.alert-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    background: var(--white);
}

.alert-card.alert-blue {
    border-left-color: var(--accent);
    background: rgba(47, 191, 160, 0.05);
}

.alert-card.alert-orange {
    border-left-color: var(--alert);
    background: rgba(244, 160, 75, 0.05);
}

.alert-card.alert-red {
    border-left-color: var(--danger);
    background: rgba(224, 84, 84, 0.05);
}

.alert-card-content {
    flex: 1;
}

.alert-card-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.alert-card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 191, 160, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
}

.auth-box {
    width: 100%;
    max-width: 450px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo a {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

/* Table Styles */
.table-fidelis {
    width: 100%;
    border-collapse: collapse;
}

.table-fidelis th {
    text-align: left;
    padding: 1rem;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-fidelis td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table-fidelis tr:hover td {
    background: var(--bg);
}

/* Badge Styles */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue {
    background: rgba(47, 191, 160, 0.1);
    color: var(--accent);
}

.badge-orange {
    background: rgba(244, 160, 75, 0.1);
    color: var(--alert);
}

.badge-red {
    background: rgba(224, 84, 84, 0.1);
    color: var(--danger);
}

/* Responsive */
@media (max-width: 991px) {
    .dashboard-sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .dashboard-main {
        margin-left: 0;
    }

    .dashboard-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer a {
        margin: 0 0.75rem;
    }
}

/* Messages */
.messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: rgba(47, 191, 160, 0.1);
    color: #1a7a66;
    border-left: 4px solid var(--accent);
}

.alert-error {
    background: rgba(224, 84, 84, 0.1);
    color: #a33d3d;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(244, 160, 75, 0.1);
    color: #a66d2e;
    border-left: 4px solid var(--alert);
}
