/* ===== STYLE PRINCIPAL BLIZZ GAMING ===== */

/* Variables CSS */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #e17055;
    --text-color: #ffffff;
    --bg-color: #0f172a;
    --card-bg: rgba(15, 23, 41, 0.95);
    --border-color: rgba(108, 92, 231, 0.3);
    --shadow-color: rgba(108, 92, 231, 0.2);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: 'RussoOne', 'Arial', sans-serif;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--shadow-color);
}

/* Liens */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.btn:hover {
    background: var(--secondary-color);
    color: #2d3436; /* Texte sombre pour meilleur contraste sur fond violet clair */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
}

/* Cartes */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    backdrop-filter: blur(10px);
}

/* Formulaires */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
}

/* CORRECTION DU DÉBORDEMENT DES CHAMPS DE TEXTE */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="url"], 
input[type="tel"], 
input[type="number"],
textarea,
select,
.form-control,
.input-field,
.form-input,
.form-textarea,
.message-input {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Correction spécifique pour les textarea */
textarea {
    resize: vertical !important;
    min-height: 100px;
    max-height: 300px;
}

/* Correction pour les champs de saisie de messages */
.message-input {
    max-height: 120px !important;
    overflow-y: auto !important;
}

/* Correction pour les champs de formulaire dans les conteneurs */
.form-group input,
.form-group textarea,
.form-group select {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Correction pour les champs dans les cartes */
.card input,
.card textarea,
.card select {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(225, 112, 85, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.alert-warning {
    background: rgba(253, 203, 110, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: 'RussoOne', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
}

/* Grilles */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary-color); }
    50% { box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.glow {
    animation: glow 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Correction responsive pour les champs de texte */
    input[type="text"], 
    input[type="email"], 
    input[type="password"], 
    input[type="url"], 
    input[type="tel"], 
    input[type="number"],
    textarea,
    select,
    .form-control,
    .input-field,
    .form-input,
    .form-textarea,
    .message-input {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Évite le zoom sur mobile */
    }
    
    textarea {
        max-height: 200px !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    h1, h2, h3 {
        font-size: 1.2rem;
    }
    
    /* Correction mobile pour les champs de texte */
    input[type="text"], 
    input[type="email"], 
    input[type="password"], 
    input[type="url"], 
    input[type="tel"], 
    input[type="number"],
    textarea,
    select,
    .form-control,
    .input-field,
    .form-input,
    .form-textarea,
    .message-input {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Évite le zoom sur mobile */
        padding: 0.75rem !important;
    }
    
    textarea {
        max-height: 150px !important;
        min-height: 80px !important;
    }
}

/* États de chargement */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Sélection de texte */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
