/* PrestaDemo Matrix Style CSS */

.prestademo-container {
    margin: 0 !important;
    padding: 2px !important;
    background: #000;
    border: 1px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.prestademo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    pointer-events: none;
}

.matrix-title {
    text-align: center;
    margin-bottom: 2px !important;
    font-family: 'Courier New', monospace;
}

.glitch {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: #00ff00;
    letter-spacing: 3px;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00ff00;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 
            0 0 5px rgba(0, 255, 0, 0.8),
            0 0 10px rgba(0, 255, 0, 0.8),
            0 0 15px rgba(0, 255, 0, 0.8);
    }
    50% {
        text-shadow: 
            0 0 5px rgba(0, 255, 0, 1),
            0 0 10px rgba(0, 255, 0, 1),
            0 0 20px rgba(0, 255, 0, 1);
    }
}

@keyframes glitch-1 {
    0%, 100% {
        clip: rect(132px, auto, 101px, 0);
        transform: skew(0deg);
    }
    20% {
        clip: rect(10px, auto, 83px, 0);
        transform: skew(0deg);
    }
    40% {
        clip: rect(40px, auto, 60px, 0);
        transform: skew(0deg);
    }
    60% {
        clip: rect(25px, auto, 45px, 0);
        transform: skew(0deg);
    }
    80% {
        clip: rect(15px, auto, 80px, 0);
        transform: skew(0deg);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip: rect(65px, auto, 119px, 0);
        transform: skew(0deg);
    }
    20% {
        clip: rect(40px, auto, 65px, 0);
        transform: skew(0deg);
    }
    40% {
        clip: rect(80px, auto, 113px, 0);
        transform: skew(0deg);
    }
    60% {
        clip: rect(25px, auto, 40px, 0);
        transform: skew(0deg);
    }
    80% {
        clip: rect(90px, auto, 115px, 0);
        transform: skew(0deg);
    }
}

.demo-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.demo-button {
    position: relative;
    display: inline-block;
    padding: 12px 24px;
    background: #000;
    border: 2px solid #00ff00;
    color: #00ff00;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
}

.demo-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    transition: left 0.5s;
}

.demo-button:hover::before {
    left: 100%;
}

.demo-button:hover {
    color: #000;
    background: #00ff00;
    box-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00,
        inset 0 0 10px rgba(0, 255, 0, 0.2);
    transform: scale(1.05);
}

.button-text {
    position: relative;
    z-index: 2;
}

.matrix-rain {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            #00ff00 2px,
            #00ff00 4px
        );
    opacity: 0;
    transition: all 0.3s ease;
}

.demo-button:hover .matrix-rain {
    top: 100%;
    opacity: 0.1;
    animation: matrix-rain 1s linear infinite;
}

@keyframes matrix-rain {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.button-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    z-index: -1;
}

.demo-button:hover .button-border {
    animation: border-pulse 1s infinite;
}

@keyframes border-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 0 5px #00ff00,
            0 0 10px #00ff00,
            0 0 15px #00ff00;
    }
    50% {
        opacity: 0.8;
        box-shadow: 
            0 0 10px #00ff00,
            0 0 20px #00ff00,
            0 0 30px #00ff00;
    }
}

/* Back Office Buttons */
.backoffice-button {
    border-color: #00ffff !important;
    color: #00ffff !important;
}

.backoffice-button:hover {
    background: #00ffff !important;
    color: #000 !important;
    box-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        inset 0 0 10px rgba(0, 255, 255, 0.2) !important;
}

.backoffice-button .matrix-rain {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            #00ffff 2px,
            #00ffff 4px
        ) !important;
}

/* Credentials Info */
.demo-credentials {
    margin-top: 2px !important;
    text-align: center;
    padding: 2px !important;
}

.credentials-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 5px;
    padding: 2px !important;
    max-width: 500px;
    margin: 0 auto !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.credentials-title {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 2px 0 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.credentials-content {
    text-align: left;
    margin: 0 !important;
    padding: 0 !important;
}

.cred-item {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 2px 0 !important;
    padding: 2px !important;
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid #00ff00;
}

.cred-item i {
    margin-right: 10px;
    color: #00ff00;
}

.cred-value {
    color: #00ffff;
    font-weight: bold;
    margin-left: 5px;
}

.cred-item:first-child {
    margin-top: 0 !important;
}

.cred-item:last-child {
    margin-bottom: 0 !important;
}

/* Forcer les marges sur tous les div du module */
.prestademo-container div {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.prestademo-container .cred-item {
    margin: 2px 0 !important;
    padding: 2px !important;
}

.prestademo-container .cred-item:first-child {
    margin-top: 0 !important;
}

.prestademo-container .cred-item:last-child {
    margin-bottom: 0 !important;
}

/* Button credentials on hover */
.button-credentials {
    display: none;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #00ff00;
    padding: 8px 12px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
    font-size: 11px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.button-credentials::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #00ff00;
}

.demo-button:hover .button-credentials {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.button-credentials .cred-email,
.button-credentials .cred-password {
    display: block;
    margin: 2px 0;
    color: #00ff00;
    font-size: 11px;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        bottom: -50px;
    }
    100% {
        opacity: 1;
        bottom: -60px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .demo-buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .demo-button {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .glitch {
        font-size: 18px;
    }
}