* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --orange-2rc: #FF5722;
    --blue-2rc: #1E3A8A;
    --orange-light: #FF8A65;
    --blue-light: #3B82F6;
    --gray-100: #F8FAFC;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-600: #475569;
    --gray-700: #374151;
    --gray-800: #1E293B;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.1), 0 2px 4px -1px rgba(255, 87, 34, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(30, 58, 138, 0.15), 0 4px 6px -2px rgba(255, 87, 34, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-100);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    position: relative;
}

/* Détails créatifs avec les couleurs 2RC */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--orange-2rc) 0px,
        var(--orange-2rc) 30px,
        var(--blue-2rc) 30px,
        var(--blue-2rc) 60px
    );
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* Éléments décoratifs */
.decorative-dots {
    position: absolute;
    top: 10%;
    right: 5%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    opacity: 0.3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot:nth-child(odd) {
    background-color: var(--orange-2rc);
}

.dot:nth-child(even) {
    background-color: var(--blue-2rc);
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    gap: 1rem;
}

.logo-container {
    width: 150px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    flex-shrink: 0;
}

.logo-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.logo-container img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

.logo-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue-2rc);
    margin-bottom: 0.5rem;
    position: relative;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--orange-2rc);
}

.header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Bouton de déconnexion */
.user-actions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
}

.logout-btn {
    background: linear-gradient(135deg, var(--orange-2rc) 0%, var(--blue-2rc) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.logout-btn:active {
    transform: translateY(0);
}

.search-container {
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--orange-2rc);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    font-size: 1.2rem;
}

/* Accent coloré sur le conteneur de recherche */
.search-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: repeating-linear-gradient(
        45deg,
        var(--orange-2rc) 0px,
        var(--orange-2rc) 1px,
        transparent 1px,
        transparent 15px,
        var(--blue-2rc) 15px,
        var(--blue-2rc) 16px,
        transparent 16px,
        transparent 30px
    );
    border-radius: 14px;
    z-index: -1;
    opacity: 0.3;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.app-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--gray-200);
}

/* Bordure colorée en haut de chaque carte */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 2;
}

.app-card:nth-child(4n+1)::before {
    background-color: var(--orange-2rc);
}

.app-card:nth-child(4n+2)::before {
    background-color: var(--blue-2rc);
}

.app-card:nth-child(4n+3)::before {
    background-color: var(--orange-2rc);
}

.app-card:nth-child(4n+4)::before {
    background-color: var(--blue-2rc);
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px -12px rgba(30, 58, 138, 0.25),
        0 8px 16px -4px rgba(255, 87, 34, 0.2),
        0 0 0 1px rgba(30, 58, 138, 0.1);
}

.app-card:hover .app-image {
    transform: scale(1.05);
}

.app-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.app-content {
    padding: 1.5rem;
}

.app-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    position: relative;
}

/* Petit accent coloré sur les titres */
.app-card:nth-child(4n+1) .app-title::before,
.app-card:nth-child(4n+3) .app-title::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background-color: var(--orange-2rc);
}

.app-card:nth-child(4n+2) .app-title::before,
.app-card:nth-child(4n+4) .app-title::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background-color: var(--blue-2rc);
}

.app-description {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.app-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.app-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(34, 197, 94, 0.1);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-maintenance {
    background-color: rgba(251, 191, 36, 0.1);
    color: #D97706;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-inactive {
    background-color: rgba(156, 163, 175, 0.1);
    color: #6B7280;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

/* Éléments décoratifs dans le footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 3px solid var(--gray-200);
    color: var(--gray-600);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--orange-2rc);
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.footer-links a:hover {
    color: var(--orange-2rc);
    background-color: rgba(255, 87, 34, 0.05);
}

.footer-links a:nth-child(even):hover {
    color: var(--blue-2rc);
    background-color: rgba(30, 58, 138, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 1rem;
    }

    .header-container {
        gap: 0.5rem;
    }

    .logo-container {
        width: 100px;
        height: 80px;
    }

    .logo-container img {
        max-width: 80px;
        max-height: 60px;
    }

    .user-actions {
        position: static;
        margin-top: 1rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .logo-container {
        width: 80px;
        height: 60px;
    }

    .logo-container img {
        max-width: 60px;
        max-height: 45px;
    }

    .decorative-dots {
        display: none;
    }

    .search-container {
        margin: 1.5rem auto;
    }

    .app-content {
        padding: 1rem;
    }

    .logout-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Animation pour l'apparition des cartes */
.app-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }
.app-card:nth-child(5) { animation-delay: 0.5s; }
.app-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Animation de fade-in pour le contenu */
.container {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}