/* Variables CSS - Charte Graphique EOGIS */
:root {
    /* Couleurs de la charte EOGIS */
    --primary-color: #90C226;        /* Couleur 1 - Vert clair */
    --primary-hover: #54A021;        /* Couleur 2 - Vert foncé */
    --success-color: #54A021;        /* Couleur 2 - Vert foncé */
    --warning-color: #E6B91E;        /* Couleur 3 - Jaune */
    --error-color: #C42F1A;          /* Couleur 5 - Rouge */
    --info-color: #E76618;           /* Couleur 4 - Orange */
    --dev-color: #99CA3C;            /* Couleur 7 - Vert lime */
    --prod-color: #54A021;           /* Couleur 2 - Vert foncé */
    
    /* Backgrounds EOGIS */
    --bg-primary: #000000;           /* Sombre 1 - Noir */
    --bg-secondary: #2C3C43;         /* Sombre 2 - Gris sombre */
    --bg-card: #2C3C43;              /* Sombre 2 - Gris sombre */
    --bg-card-hover: #44545c;        /* Sombre 2 éclairci */
    
    /* Textes EOGIS */
    --text-primary: #FFFFFF;         /* Clair 1 - Blanc */
    --text-secondary: #EBEBEB;       /* Clair 2 - Gris clair */
    --text-muted: #B9D181;           /* Couleur 8 - Vert pastel */
    
    /* Bordures EOGIS */
    --border-color: #918655;         /* Couleur 6 - Vert olive */
    --border-hover: #90C226;         /* Couleur 1 - Vert clair */
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.environment-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.environment-badge.dev {
    background: rgba(153, 202, 60, 0.2);
    color: #99CA3C;
    border: 1px solid rgba(153, 202, 60, 0.3);
}

.environment-badge.prod {
    background: rgba(84, 160, 33, 0.2);
    color: #54A021;
    border: 1px solid rgba(84, 160, 33, 0.3);
}

.badge-icon {
    font-size: 1rem;
}

/* Main content */
.main {
    flex: 1;
    padding-bottom: 2rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.service-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.2));
}

.service-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
    min-width: 120px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 100px;
}

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

.status-indicator.online {
    background: rgba(84, 160, 33, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(84, 160, 33, 0.3);
}

.status-indicator.online .status-dot {
    background: var(--success-color);
    animation: none;
}

.status-indicator.offline {
    background: rgba(196, 47, 26, 0.2);
    color: var(--error-color);
    border: 1px solid rgba(196, 47, 26, 0.3);
}

.status-indicator.offline .status-dot {
    background: var(--error-color);
    animation: none;
}

.status-indicator.warning {
    background: rgba(230, 185, 30, 0.2);
    color: var(--warning-color);
    border: 1px solid rgba(230, 185, 30, 0.3);
}

.status-indicator.warning .status-dot {
    background: var(--warning-color);
    animation: none;
}

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

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.service-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.link-button:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.link-button.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.link-button.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.link-icon {
    font-size: 0.75rem;
    opacity: 0.7;
}

.info-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* Info sections */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.info-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    space-y: 0.5rem;
}

.info-card li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.info-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.system-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links span {
    white-space: nowrap;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .status-indicator {
        align-self: flex-end;
    }
    
    .welcome-section h2 {
        font-size: 1.875rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .service-links {
        flex-direction: column;
    }
    
    .link-button {
        justify-content: center;
    }
    
    .system-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    animation: fadeInUp 0.6s ease-out;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

.info-card {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}
