/**
 * Fichier : https://aqbayli.com/css/main.css
 * Rôle : Charte graphique intégrale, Responsive et Optimisée Mobile
 * Support : index.php, contact.php (Portail Racine)
 * VERSION : 3.9 - Organisation par sections numérotées & Fusion des doublons
 */

/* ==========================================================================
   1. VARIABLES & SYSTÈME DE THÈMES (ISOLATION TECHNIQUE)
   ========================================================================== */
:root {
    --primary-orange: #FF8C00;
    --orange-glow: rgba(255, 140, 0, 0.3);
    --bg-dark: #1a1a1a;
    --card-bg: #333333;
    --text-white: #ffffff;
    --text-muted: #cccccc;
    --error-red: #e74c3c;
    --success-green: #27ae60;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. RÉINITIALISATION & BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0; padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; overflow-x: hidden;
}

/* ==========================================================================
   3. STRUCTURE DU CONTENEUR (CARTE PRINCIPALE)
   ========================================================================== */
.container {
    width: 95%; max-width: 900px;
    padding: 30px 40px 15px; /* Resserre le vide en haut et en bas */
    background-color: rgba(51, 51, 51, 0.95);
    border-radius: 20px;
    border-top: 6px solid var(--primary-orange);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    margin: 10px; position: relative; text-align: center; /* Marge externe réduite */
}

/* ==========================================================================
   4. IDENTITÉ VISUELLE (TYPOGRAPHIE & SYMBOLES)
   ========================================================================== */
.yaz-symbol {
    font-size: 65px; /* Plus compact pour remonter le titre */
    color: var(--primary-orange);
    margin-bottom: 10px; line-height: 1;
    text-shadow: 0 0 15px var(--orange-glow);
    user-select: none;
}

h1 { font-size: 2.2rem; margin: 0 0 5px 0; letter-spacing: 2px; font-weight: 800; }
.subtitle { color: var(--primary-orange); font-size: 1rem; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.separator { border: 0; height: 1px; background: linear-gradient(to right, transparent, var(--primary-orange), transparent); margin: 40px 0; opacity: 0.5; }

/* ==========================================================================
   5. ZONE CAPTCHA
   ========================================================================== */
.captcha-box {
    background: #222;
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px dashed var(--primary-orange);
    margin-bottom: 20px;
    gap: 15px;
}

.captcha-label { font-size: 0.8rem; color: var(--text-muted); font-weight: bold; }

.captcha-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-orange);
    letter-spacing: 4px;
}

.captcha-refresh { text-decoration: none; font-size: 1.2rem; transition: var(--transition); color: white; }
.captcha-refresh:hover { transform: rotate(180deg); color: var(--primary-orange); }

.info-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }

/* ==========================================================================
   6. FORMULAIRE & PASSWORD TOGGLE (LOGIN)
   ========================================================================== */
.login-form { display: flex; justify-content: center; margin: 20px 0; }

.input-group {
    display: flex; gap: 10px; width: 100%; max-width: 500px;
}

.password-wrapper {
    position: relative;
    flex: 2;
    display: flex;
}

.input-password {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border-radius: 8px;
    border: 2px solid #444;
    background: #222;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-password:focus { border-color: var(--primary-orange); box-shadow: 0 0 10px var(--orange-glow); }

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    user-select: none;
    transition: var(--transition);
}

.toggle-password:hover { color: var(--primary-orange); }

.btn-submit {
    flex: 1; padding: 15px; background: var(--primary-orange);
    border: none; color: #000; font-weight: 800;
    border-radius: 8px; cursor: pointer; text-transform: uppercase;
    transition: var(--transition);
}

.btn-submit:hover { transform: scale(1.02); background: #ff9d26; }

.error-box {
    background: rgba(231, 76, 60, 0.15); color: #ff6b6b;
    padding: 15px; border-radius: 8px; border-left: 4px solid var(--error-red);
    margin-top: 25px; display: inline-block;
}

/* ==========================================================================
   7. FORMULAIRE DE CONTACT (STRUCTURE & CONTROLE)
   ========================================================================== */
.form-contact { text-align: left; max-width: 650px; margin: 0 auto; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Resserre l'écart entre les colonnes */
}

.form-group { margin-bottom: 12px; } /* Réduction de l'interligne des blocs */

.form-group label {
    display: block;
    color: var(--primary-orange);
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 10px 14px; /* Inputs plus fins et élégants */
    border-radius: 8px;
    border: 2px solid #444;
    background: #222;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 10px var(--orange-glow);
}

select.form-control { cursor: pointer; }
textarea.form-control { 
    height: 152px; 
    resize: none;  
}
.btn-cancel {
    display: inline-block;
    margin-top: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-cancel:hover { color: var(--error-red); text-decoration: underline; }

/* ==========================================================================
   8. GRILLE DES MODULES (CARDS)
   ========================================================================== */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 25px; margin-bottom: 40px; }

.card-link { text-decoration: none; color: inherit; display: block; }

.module-card {
    background: #3a3a3a; padding: 30px 20px; border-radius: 12px;
    border-bottom: 4px solid transparent; height: 100%;
    transition: var(--transition); border: 1px solid #444;
}

.module-card:hover { transform: translateY(-5px); background: #444; border-bottom-color: var(--primary-orange); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

.card-icon { font-size: 2.5rem; margin-bottom: 15px; }

.module-card h3 { color: var(--primary-orange); margin: 0 0 12px 0; }

.module-card p { font-size: 0.9rem; color: #bbb; line-height: 1.5; margin: 0; }

.test-module:hover { border-bottom-color: var(--success-green); }

/* ==========================================================================
   9. ANIMATIONS & STATUT INDICATEURS
   ========================================================================== */
.dot { height: 10px; width: 10px; background-color: var(--primary-orange); border-radius: 50%; display: inline-block; }
.pulse { animation: pulse-animation 2s infinite; }

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px var(--orange-glow); }
    100% { box-shadow: 0 0 0 10px rgba(255, 140, 0, 0); }
}

.status-indicator {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255, 140, 0, 0.1); color: var(--primary-orange);
    padding: 10px 25px; border-radius: 50px; font-weight: 800; font-size: 0.85rem; 
    margin-bottom: 20px; transition: var(--transition);
}

/* Style spécifique pour le lien Contact en bas de page */
a .status-indicator:hover {
    background: var(--primary-orange);
    color: #000;
}

/* ==========================================================================
   10. BOUTON DÉCONNEXION (PORTAIL)
   ========================================================================== */
.btn-logout {
    position: absolute; top: 25px; right: 25px;
    background: rgba(231, 76, 60, 0.15); color: #ff6b6b; text-decoration: none;
    padding: 10px 18px; border-radius: 6px; font-size: 0.85rem; font-weight: 700;
    border: 1px solid rgba(231, 76, 60, 0.3); transition: var(--transition);
}

.btn-logout:hover { background: var(--error-red); color: white; transform: translateY(-2px); }

/* ==========================================================================
   11. NOTIFICATIONS FLASH (LOGIQUE NOTIF)
   ========================================================================== */
.notif-box {
    padding: 15px 40px 15px 20px;
    margin: 20px auto;
    border-radius: 8px;
    position: relative;
    max-width: 600px;
    font-size: 0.95rem;
    text-align: left;
    border-left: 5px solid;
    animation: fadeIn 0.5s ease;
}
.notif-success { background: rgba(39, 174, 96, 0.15); color: #2ecc71; border-color: #27ae60; }
.notif-error { background: rgba(231, 76, 60, 0.15); color: #ff6b6b; border-color: #e74c3c; }
.notif-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: bold;
    opacity: 0.7;
    line-height: 1;
}
.notif-close:hover { opacity: 1; color: white; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   12. RESPONSIVE DESIGN (ADAPTATION MOBILE)
   ========================================================================== */
@media (max-width: 600px) {
    .container { padding: 70px 20px 30px; }
    h1 { font-size: 1.8rem; }
    .yaz-symbol { font-size: 70px; }
    .input-group { flex-direction: column; gap: 15px; }
    .password-wrapper, .input-password, .btn-submit { width: 100%; flex: none; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .btn-submit { padding: 15px; }
    .btn-logout { top: 15px; right: 50%; transform: translateX(50%); width: auto; }
    .captcha-box { width: 100%; justify-content: center; }
}