/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: -1;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffffff, #e8f4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Grid des applications - Layout 2x2 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    padding: 0 1rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Cartes des applications */
.menu-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.menu-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.menu-link:hover {
    background: linear-gradient(135deg, rgba(248, 249, 255, 0.8) 0%, rgba(232, 240, 255, 0.8) 100%);
}

/* Icônes */
.menu-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.menu-item:hover .menu-icon {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 12px 35px rgba(118, 75, 162, 0.4);
}

.menu-icon svg {
    width: 36px;
    height: 36px;
}

/* Titres et descriptions */
.menu-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2d3748;
    transition: color 0.3s ease;
}

.menu-item:hover h3 {
    color: #667eea;
}

.menu-item p {
    font-size: 1rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Effet de survol supplémentaire */
.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.menu-item:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .menu-link {
        padding: 2rem 1.5rem;
    }
    
    .menu-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .menu-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .menu-item h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-link {
        padding: 1.5rem;
    }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-item {
    animation: fadeInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-item:nth-child(3) { animation-delay: 0.3s; }
.menu-item:nth-child(4) { animation-delay: 0.4s; }

/* Animation de particules d'arrière-plan */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

/* Styles pour le menu Contrats en développement */
.menu-item.disabled {
    opacity: 0.7;
    position: relative;
    cursor: not-allowed;
}

.menu-item.disabled .menu-link {
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
}

.menu-item.disabled .menu-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.menu-item.disabled .menu-icon svg {
    opacity: 0.6;
}

.menu-item.disabled h3 {
    color: #dc3545;
}

.menu-item.disabled p {
    color: #6c757d;
}

/* Tampon "en développement" */
.development-stamp {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transform: rotate(5deg);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: rotate(5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

/* Tampon "BETA" pour le menu Plannings */
.beta-stamp {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transform: rotate(-5deg);
    z-index: 10;
    animation: pulseBeta 2s infinite;
}

@keyframes pulseBeta {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(-5deg) scale(1.05); }
}