:root {
    --primary: #3b82f6;      /* Blue */
    --primary-hover: #2563eb;
    --secondary: #8b5cf6;    /* Purple */
    --tertiary: #10b981;     /* Emerald */
    --bg-color: #f8fafc;     /* Light slate */
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.025);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --radius-lg: 20px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Arrière-plan décoratif subtil */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.04), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.04), transparent 25%);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 20px;
    flex-grow: 1;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 15px;
}

.main-title .highlight {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 24px;
    background: var(--primary);
    border-radius: 4px;
}

/* Grilles */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Cartes communes */
.card {
    flex: 0 1 340px; /* Force une largeur fixe mais adaptative */
    max-width: 100%;
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
}

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

/* Images de couvertures */
.card-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover .card-image {
    transform: scale(1.08); /* Zoom effect */
}

/* Badges sur l'image */
.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: white;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.badge-primary { background-color: rgba(59, 130, 246, 0.9); }
.badge-secondary { background-color: rgba(139, 92, 246, 0.9); }
.badge-tertiary { background-color: rgba(16, 185, 129, 0.9); }

/* Contenu textuel de la carte */
.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    transition: color 0.3s;
}

.card:hover .card-content h3 {
    color: var(--primary);
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Lien d'action ("Call to action") sur la carte */
.link-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
    transition: gap 0.3s;
}

.link-text .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.card:hover .link-text {
    gap: 12px;
}

/* Cartes pour les outils */
.tool-card {
    flex: 0 1 320px;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    min-height: 140px;
}

.tool-card .card-content {
    padding: 0 0 0 20px;
}

.tool-card .card-content p {
    margin-bottom: 0;
}

.tool-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.tool-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s;
}

.card:hover .tool-icon img {
    transform: rotate(5deg) scale(1.1);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Animations d'apparition */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive ajustements */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 40px 15px;
    }
    
    .tool-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .tool-card .card-content {
        padding: 20px 0 0 0;
    }
    
    .tool-icon {
        width: 100px;
        height: 100px;
    }
}