.checkerboard_red {
    /* Variables de couleurs du damier */
    --color-primary: #4a5568;      /* Gris par défaut */
    --color-secondary: #c53030;    /* Rouge par défaut */
    --color-primary-hover: #2d3748;   /* Gris foncé au survol */
    --color-secondary-hover: #9b2c2c; /* Rouge foncé au survol */
    
    display: grid;
    grid-template-columns: repeat(2, 1fr 2fr);
    gap: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 100%;
    margin: 0 auto;
}
    
.checkerboard_green {
    /* Variables de couleurs du damier */
    --color-primary: #4a5568;      /* Gris par défaut */
    --color-secondary: #09722c;    /* Rouge par défaut */
    --color-primary-hover: #2d3748;   /* Gris foncé au survol */
    --color-secondary-hover: #015229; /* Rouge foncé au survol */
    
    display: grid;
    grid-template-columns: repeat(2, 1fr 2fr);
    gap: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 100%;
    margin: 0 auto;
}

.checkerboard_blue {
    /* Variables de couleurs du damier */
    --color-primary: #4a5568;
    --color-secondary: #100972;
    --color-primary-hover: #2d3748;
    --color-secondary-hover: #09032b;
    
    display: grid;
    grid-template-columns: repeat(2, 1fr 2fr);
    gap: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 100%;
    margin: 0 auto;
}

.checkerboard_orange {
    /* Variables de couleurs du damier */
    --color-primary: #4a5568;
    --color-secondary: #df8a1c;
    --color-primary-hover: #2d3748;
    --color-secondary-hover: #91620b;
    
    display: grid;
    grid-template-columns: repeat(2, 1fr 2fr);
    gap: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 100%;
    margin: 0 auto;
}

/* Wrapper pour forcer le carré */
.cell {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Crée un carré parfait */
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

/* Contenu positionné à l'intérieur du carré */
.cell-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 4vw, 40px);
}

.description {
    width: 100%;
    padding: clamp(15px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    min-height: 150px;
}

.description h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: clamp(14px, 2vw, 16px);
}

.description p {
    color: #666;
    line-height: 1.6;
    font-size: clamp(12px, 1.8vw, 14px);
}

.cell:hover + .description {
    background: #f9f9f9;
    border-color: #ccc;
}

/* Alternance des couleurs en damier */
.cell:nth-of-type(4n+1) { background: var(--color-primary); }
.cell:nth-of-type(4n+3) { background: var(--color-secondary); }
.cell:nth-of-type(4n+2) { background: var(--color-secondary); }
.cell:nth-of-type(4n+4) { background: var(--color-primary); }

/* Changement de couleur au survol */
.cell:hover {
    transform: scale(1.08) rotate(2deg);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.cell:nth-of-type(4n+1):hover,
.cell:nth-of-type(4n+4):hover {
    background: var(--color-primary-hover);
}

.cell:nth-of-type(4n+2):hover,
.cell:nth-of-type(4n+3):hover {
    background: var(--color-secondary-hover);
}

.cell:hover .cell-icon {
    transform: scale(1.2) rotateY(360deg);
    transition: transform 0.6s ease;
}

.cell:hover .cell-title {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.cell:hover .cell-subtitle {
    opacity: 1;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.cell-icon {
    font-size: clamp(30px, 6vw, 40px);
    margin-bottom: clamp(10px, 3vw, 20px);
}

.cell-title {
    font-size: clamp(12px, 2vw, 14px);
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.cell-subtitle {
    font-size: clamp(10px, 1.8vw, 12px);
    opacity: 0.8;
    text-align: center;
}

/* Media queries - Passage en colonne unique SUR MOBILE UNIQUEMENT */
@media (max-width: 768px) { 
    .checkerboard_red {
        grid-template-columns: 1fr !important;
    }
    .checkerboard_green {
        grid-template-columns: 1fr !important;
    }
    .checkerboard_blue {
        grid-template-columns: 1fr !important;
    }
    .checkerboard_orange {
        grid-template-columns: 1fr !important;
    }

    /* Les cases deviennent des rectangles horizontaux (larges et bas) */
    .cell {
        padding-bottom: 0; /* Annule le carré */
        min-height: 100px; /* Rectangle bas */
    }
    
    .cell-content {
        position: static; /* Revient au flux normal */
        height: 100%;
        flex-direction: column; /* Garde la direction verticale */
        padding: 20px;
    }
    
    .cell-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .cell-title {
        margin-bottom: 5px;
    }
    
    .cell:hover {
        transform: scale(1.01);
    }
    
    .description {
        min-height: auto;
    }
}

/* Ajustements fins pour très petits écrans */
@media (max-width: 480px) {
    .cell {
        min-height: 90px;
    }
    
    .cell-content {
        padding: 15px;
    }
    
    .cell-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .cell-title {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .cell-subtitle {
        font-size: 11px;
    }
}