/* ============================================
   SPIKTOUS — Systeme de pictogrammes
   Formes : cercle, carre, triangle, croix
   Couleurs : rouge, vert, bleu, jaune
   ============================================ */

.shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.shape-sm { width: 32px; height: 32px; }
.shape-md { width: 48px; height: 48px; }
.shape-lg { width: 64px; height: 64px; }
.shape-xl { width: 96px; height: 96px; }

/* --- Formes --- */
.shape-circle {
    border-radius: 50%;
}

.shape-square {
    border-radius: 4px;
}

.shape-triangle {
    background: transparent;
    width: 0;
    height: 0;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-bottom: 42px solid currentColor;
}

.shape-sm.shape-triangle {
    border-left-width: 16px;
    border-right-width: 16px;
    border-bottom-width: 28px;
}

.shape-lg.shape-triangle {
    border-left-width: 32px;
    border-right-width: 32px;
    border-bottom-width: 56px;
}

.shape-xl.shape-triangle {
    border-left-width: 48px;
    border-right-width: 48px;
    border-bottom-width: 84px;
}

.shape-cross {
    position: relative;
    background: transparent;
}

.shape-cross::before,
.shape-cross::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
}

.shape-cross::before {
    width: 60%;
    height: 16%;
    top: 42%;
    left: 20%;
}

.shape-cross::after {
    width: 16%;
    height: 60%;
    top: 20%;
    left: 42%;
}

/* --- Couleurs --- */
.shape-red { background-color: #E63946; color: #E63946; }
.shape-green { background-color: #2d9b4e; color: #2d9b4e; }
.shape-blue { background-color: #1D3557; color: #1D3557; }
.shape-yellow { background-color: #f0ad4e; color: #f0ad4e; }

/* Triangles et croix utilisent color au lieu de background */
.shape-triangle.shape-red { background-color: transparent; border-bottom-color: #E63946; }
.shape-triangle.shape-green { background-color: transparent; border-bottom-color: #2d9b4e; }
.shape-triangle.shape-blue { background-color: transparent; border-bottom-color: #1D3557; }
.shape-triangle.shape-yellow { background-color: transparent; border-bottom-color: #f0ad4e; }

.shape-cross.shape-red { background-color: transparent; color: #E63946; }
.shape-cross.shape-green { background-color: transparent; color: #2d9b4e; }
.shape-cross.shape-blue { background-color: transparent; color: #1D3557; }
.shape-cross.shape-yellow { background-color: transparent; color: #f0ad4e; }

/* --- Animation feedback --- */
.shape-pulse {
    animation: shapePulse 0.3s ease;
}

@keyframes shapePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.shape-correct {
    box-shadow: 0 0 0 4px #2d9b4e;
    animation: shapeCorrect 0.4s ease;
}

@keyframes shapeCorrect {
    0% { box-shadow: 0 0 0 0 rgba(45, 155, 78, 0.5); }
    100% { box-shadow: 0 0 0 8px rgba(45, 155, 78, 0); }
}

.shape-wrong {
    animation: shapeShake 0.4s ease;
}

@keyframes shapeShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
