/* CSS pour remplacer les images manquantes par du contenu généré */

/* Remplacement des images d'opération par du texte stylisé */
.operation-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #644a96;
    color: white;
    font-weight: bold;
    font-size: 18px;
    border-radius: 5px;
    text-align: center;
}

/* Remplacements spécifiques pour chaque opération */
img[src*="plus2.png"] {
    content: "+";
}

img[src*="minus2.png"] {
    content: "-";
}

img[src*="mul2.png"] {
    content: "×";
}

img[src*="div2.png"] {
    content: "÷";
}

img[src*="xnbis.png"] {
    content: "^";
}

img[src*="xegal.png"] {
    content: "=";
}

/* Fallback pour images qui ne se chargent pas - forcer l'affichage du texte */
img[src*="plus2.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #44a857 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "+" !important;
}

/* Éléments de remplacement pour Safari/iPad */
.operation-symbol {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
}

.operation-symbol.plus { background: #44a857 !important; }
.operation-symbol.minus { background: #ff6b6b !important; }
.operation-symbol.multiply { background: #4a90e2 !important; }
.operation-symbol.divide { background: #ff8c00 !important; }
.operation-symbol.power { background: #9b59b6 !important; }
.operation-symbol.equals { background: #2ecc71 !important; }

img[src*="minus2.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #ff6b6b !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "−" !important;
}

img[src*="mul2.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #4a90e2 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "×" !important;
}

img[src*="div2.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #ff8c00 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "÷" !important;
}

img[src*="xnbis.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #9b59b6 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "^" !important;
}

img[src*="xegal.png"] {
    width: 30px !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
    background: #2ecc71 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-style: normal !important;
    text-indent: 0 !important;
    content: "=" !important;
}

/* Suppression des pseudo-éléments incompatibles avec <img> - styles déjà appliqués ci-dessus */

/* CSS supprimé - règles redondantes avec pseudo-éléments incompatibles */

/* Style pour l'image d'introduction manquante */
.intro-image:not([src]), 
img[src*="intro.png"] {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #644a96 0%, #d2b50b 50%, #644a96 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    object-fit: cover;
}

.intro-image:not([src])::before,
img[src*="intro.png"]::before {
    content: "EQUAELIBRE";
    color: white;
    font-size: 8vw;
    font-weight: bold;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.7);
    font-family: 'Comic Sans MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

/* Animation subtile pour l'écran d'intro */
.intro-image {
    animation: introGlow 3s ease-in-out infinite alternate;
}

@keyframes introGlow {
    0% {
        box-shadow: inset 0 0 50px rgba(255,255,255,0.1);
    }
    100% {
        box-shadow: inset 0 0 80px rgba(255,255,255,0.2);
    }
}

/* Icône par défaut */
img[src*="output_icon.png"] {
    width: 32px;
    height: 32px;
    background: #644a96;
    border-radius: 50%;
    position: relative;
}

img[src*="output_icon.png"]::before {
    content: "E";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
}