/* Style inspiré de index.html pour web-api.html */
/* Utilise la police Montserrat et le dégradé violet-bleu */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

/* Override des styles de base pour adopter le style index.html */
body {
    font-family: 'Montserrat', sans-serif !important;
    background: #667eea !important;
    min-height: 100vh;
    color: white !important;
    padding: 20px;
    padding-top: 40px; /* Réduit car pas de barre d'auth globale fixe */
    animation: fadeInUp 1s ease-out;
}

/* Conteneur principal avec style glassmorphism */
.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: auto;
    min-height: calc(100vh - 140px);
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Panneaux avec effet glassmorphism comme index.html */
.left-panel, .right-panel {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow-y: visible;
}

/* Logo dans le style index.html */
.header-logo {
    text-align: center !important;
    padding: 0 0 20px 0 !important;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-text-innogam {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    line-height: 1.1;
    margin-bottom: 0;
    display: inline-block;
    vertical-align: middle;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-inno {
    color: #fff !important;
}

.logo-gam {
    color: #2da2c8 !important;
}

.logo-text-api-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-left: 25px;
    vertical-align: middle;
    line-height: 1;
    text-align: center;
    position: relative;
    top: 0;
    justify-content: center;
}

.logo-text-api {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.5rem !important;
    color: #ff8c00 !important;
    font-weight: 700 !important;
    letter-spacing: 0.2em;
    display: block;
    margin-top: 0;
    text-align: center;
}

.api-version {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1rem !important;
    color: rgba(255, 152, 0, 0.8) !important;
    font-weight: 400 !important;
    letter-spacing: normal;
    display: block;
    text-align: center;
    margin-top: 0;
}

/* Titres des sections */
h2 {
    color: #ffd700 !important;
    border-bottom: 2px solid rgba(255, 215, 0, 0.6) !important;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif !important;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Formulaires avec style glassmorphism */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600 !important;
    color: #e0e7ff !important;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif !important;
}

input[type="text"], input[type="password"], select, textarea {
    width: 100% !important;
    max-width: none !important;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px !important;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif !important;
    backdrop-filter: blur(15px);
}

input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

input[type="text"]::placeholder, input[type="password"]::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Boutons avec style index.html */
button {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 12px 24px;
    border-radius: 25px !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600 !important;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif !important;
    position: relative;
    z-index: 1; /* Z-index faible pour les boutons */
}

button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

button:disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Boutons spéciaux */
button#ad41-btn {
    background: rgba(162, 210, 255, 0.2) !important;
    border-color: rgba(162, 210, 255, 0.4) !important;
    color: #a7d2ff !important;
}

button#ad41-btn:hover {
    background: rgba(162, 210, 255, 0.3) !important;
}

button#login-btn {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #86efac !important;
}

button#login-btn:hover {
    background: rgba(34, 197, 94, 0.3) !important;
}

button#logout-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    padding: 8px 16px;
    font-size: 12px;
}

button#logout-btn:hover {
    background: rgba(239, 68, 68, 0.3) !important;
}

/* Messages de succès et d'erreur - cohérent avec index.html */
.success {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #86efac !important;
    padding: 15px;
    border-radius: 15px !important;
    margin: 15px 0;
    backdrop-filter: blur(10px) !important;
}

.error {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    padding: 15px;
    border-radius: 15px !important;
    margin: 15px 0;
    font-weight: 500;
    backdrop-filter: blur(10px) !important;
}

/* Zone de réponse - cohérent avec index.html */
.response {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 20px;
    border-radius: 15px !important;
    margin: 15px 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #e2e8f0 !important;
    max-height: 700px;
    overflow-y: auto;
    line-height: 1.5;
}

/* URL d'endpoint - cohérent avec index.html */
.endpoint-url {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #a5b4fc !important;
    padding: 10px 15px;
    border-radius: 12px !important;
    display: block;
    font-size: 0.8rem;
    flex: 1;
    margin: 0;
    backdrop-filter: blur(10px) !important;
}

/* Informations utilisateur - cohérent avec index.html */
.user-details {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

.user-details h3 {
    color: #ffd700 !important;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-bottom: 8px;
}

.info-label {
    color: #e0e7ff !important;
    font-weight: 600 !important;
    font-size: 0.85rem;
    flex: 0 0 40%;
    font-family: 'Montserrat', sans-serif !important;
}

.info-value {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 5px 10px !important;
    border-radius: 15px !important;
    flex: 1;
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Z-index management - S'assurer que les dropdowns passent au-dessus de tout */
.custom-select {
    z-index: 1000 !important;
}

.custom-select.active {
    z-index: 10001 !important;
}

.select-dropdown {
    z-index: 9999 !important;
}

.custom-select.active .select-dropdown {
    z-index: 10000 !important;
}

/* Style spécifique pour le bouton de copie - override des styles généraux */
.copy-url-btn {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 15px !important;
    border-radius: 0 !important;
    margin: 0 !important;
    z-index: 1 !important;
    position: relative;
}

.copy-url-btn:hover {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.copy-url-btn:disabled {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* S'assurer que tous les autres boutons ont un z-index faible */
button, 
button#ad41-btn, 
button#login-btn, 
button#logout-btn,
.export-buttons-mini button {
    z-index: 1 !important;
    position: relative;
}

/* Responsive comme index.html */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1.5rem;
    }
    
    .logo-text-innogam {
        font-size: 2.5rem !important;
    }
    
    .logo-text-api {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
        padding-top: 30px;
    }
    
    .left-panel, .right-panel {
        padding: 20px;
    }
    
    .logo-text-innogam {
        font-size: 2rem !important;
    }
    
    .logo-text-api {
        font-size: 1rem !important;
    }
    
    .logo-text-api-container {
        margin-left: 15px;
    }
}
