/* Styles pour le système de failles dimensionnelles */

/* Overlay de faille */
.faille-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Le portail de faille */
.faille-portal {
    position: relative;
    width: 600px;
    height: 400px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    box-shadow: 0 0 100px rgba(0, 100, 255, 0.3);
}

.faille-portal.active {
    transform: scale(1);
    opacity: 1;
}

/* Effets d'énergie selon la rareté */
.faille-energy {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-position: center;
    background-size: cover;
    pointer-events: none;
    opacity: 0.3;
    animation: rotateEnergy 20s linear infinite;
}

@keyframes rotateEnergy {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style selon la rareté */
.faille-portal.common .faille-energy {
    background-image: radial-gradient(circle, transparent 30%, #4CAF50 70%);
}

.faille-portal.rare .faille-energy {
    background-image: radial-gradient(circle, transparent 30%, #3F51B5 70%);
}

.faille-portal.epic .faille-energy {
    background-image: radial-gradient(circle, transparent 30%, #9C27B0 70%);
}

.faille-portal.legendary .faille-energy {
    background-image: radial-gradient(circle, transparent 30%, #FFC107 70%);
    animation: rotateEnergy 10s linear infinite, pulseEnergy 3s ease-in-out infinite alternate;
}

.faille-portal.mythical .faille-energy {
    background-image: radial-gradient(circle, transparent 30%, #FF5252 70%);
    animation: rotateEnergy 5s linear infinite, pulseEnergy 2s ease-in-out infinite alternate;
}

@keyframes pulseEnergy {
    0% { opacity: 0.2; }
    100% { opacity: 0.5; }
}

/* Contenu de la faille */
.faille-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.faille-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.faille-name {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 15px currentColor;
}

.faille-description {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.5;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.faille-duration {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Boutons */
.faille-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.accept-faille, .reject-faille {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.accept-faille {
    background: linear-gradient(45deg, #00b8d4, #0091ea);
    color: white;
    box-shadow: 0 0 15px rgba(0, 184, 212, 0.5);
}

.reject-faille {
    background: rgba(255, 255, 255, 0.15);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.accept-faille:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 184, 212, 0.7);
}

.reject-faille:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

/* Indicateur de faille active */
.faille-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 20, 0.9);
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: appear 0.5s ease-out forwards;
}

.faille-indicator.closing {
    animation: disappear 0.5s ease-in forwards;
}

@keyframes appear {
    from { transform: translate(-50%, -50px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes disappear {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, -50px); opacity: 0; }
}

.faille-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    z-index: -1;
    opacity: 0.5;
}

.faille-indicator.common::before {
    box-shadow: 0 0 30px #4CAF50;
    border: 1px solid #4CAF50;
}

.faille-indicator.rare::before {
    box-shadow: 0 0 30px #3F51B5;
    border: 1px solid #3F51B5;
}

.faille-indicator.epic::before {
    box-shadow: 0 0 30px #9C27B0;
    border: 1px solid #9C27B0;
}

.faille-indicator.legendary::before {
    box-shadow: 0 0 30px #FFC107;
    border: 1px solid #FFC107;
    animation: pulseBorder 1s infinite alternate;
}

.faille-indicator.mythical::before {
    box-shadow: 0 0 30px #FF5252;
    border: 1px solid #FF5252;
    animation: pulseBorder 0.5s infinite alternate;
}

@keyframes pulseBorder {
    from { opacity: 0.3; }
    to { opacity: 0.8; }
}

.faille-indicator-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.faille-indicator-icon i {
    font-size: 20px;
    color: white;
}

.faille-indicator-info {
    display: flex;
    flex-direction: column;
}

.faille-indicator-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 3px;
}

.faille-indicator-timer {
    font-size: 14px;
    opacity: 0.8;
}

/* Messages d'effet mythique */
.mythical-effect-message {
    position: fixed;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 82, 82, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    z-index: 9000;
    box-shadow: 0 0 30px rgba(255, 82, 82, 0.8);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mythical-effect-message i {
    font-size: 22px;
}

@keyframes fadeInOut {
    0% { transform: translate(-50%, -30px); opacity: 0; }
    10% { transform: translate(-50%, 0); opacity: 1; }
    90% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, -30px); opacity: 0; }
}