/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --bleu-fonce: #0f172a;
    --bleu-moyen: #1e3a5f;
    --bleu-clair: #3b82f6;
    --or-principal: #d4af37;
    --or-clair: #f4d03f;
    --blanc: #ffffff;
    --gris-clair: #f8fafc;
    --gris-texte: #cbd5e1;
    --noir: #1e293b;
    --whatsapp: #25d366;
    --vert: #22c55e;
    --rouge: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu-moyen) 100%);
    color: var(--blanc);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a { text-decoration: none; }
ul { list-style: none; }

/* RÈGLE STRICTE POUR TOUTES LES IMAGES DU SITE */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--or-principal);
    backdrop-filter: blur(10px);
}

.header-top {
    padding: 15px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 55px !important;
    height: 55px !important;
    max-width: 55px !important;
    object-fit: contain;
    border-radius: 50%;
    background: var(--blanc);
    padding: 4px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.logo-text h1 {
    color: var(--or-principal);
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    margin: 0;
}

.logo-text span {
    color: var(--blanc);
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 400;
    display: block;
}

.whatsapp-header {
    background: var(--whatsapp);
    color: var(--blanc);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: transform 0.3s;
}

.whatsapp-header:hover {
    transform: translateY(-2px);
}

.main-nav {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    color: var(--blanc);
    padding: 15px 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(212, 175, 55, 0.1);
    border-bottom-color: var(--or-principal);
    color: var(--or-clair);
}

/* =========================================
   BANNIÈRE HERO
   ========================================= */
.hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bleu-fonce);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.banner-cta {
    position: absolute;
    bottom: 20px;
    right: 30px;
    z-index: 10;
}

.btn-banner {
    display: inline-block;
    background: linear-gradient(135deg, var(--or-principal), var(--or-clair));
    color: var(--bleu-fonce);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s;
    border: 2px solid var(--blanc);
}

.btn-banner:hover { 
    transform: translateY(-3px) scale(1.05); 
}

/* =========================================
   SECTION AFFICHE
   ========================================= */
.affiche-section {
    padding: 60px 0;
    background: transparent; 
}

.affiche-wrapper {
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
    background: var(--blanc);
    border-radius: 15px;
    overflow: hidden;
    border: 5px solid var(--or-principal);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
}

.affiche-wrapper::before {
    content: '🔥 OFFRE SPÉCIALE 🔥';
    position: absolute;
    top: 20px;
    right: -35px;
    background: #e74c3c;
    color: var(--blanc);
    padding: 5px 40px;
    font-weight: 800;
    font-size: 0.85rem;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.affiche-img {
    width: 100%;
    height: auto;
    display: block;
}

.affiche-cta {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu-moyen));
    border-top: 2px solid var(--or-principal);
}

.affiche-cta h3 {
    color: var(--or-clair);
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--or-principal), var(--or-clair));
    color: var(--bleu-fonce);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s;
}

.btn-primary:hover { transform: scale(1.05); }

/* =========================================
   FORMULAIRES (INSCRIPTION / CONTACT)
   ========================================= */
.form-container {
    max-width: 600px;
    width: 100%;
    margin: 50px auto;
    padding: 0 20px;
}

.form-box {
    background: var(--blanc);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-top: 5px solid var(--or-principal);
    color: var(--noir);
    width: 100%;
}

.form-box h2 {
    color: var(--bleu-fonce);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--bleu-moyen);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    color: var(--noir);
    background: var(--blanc);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--or-principal);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu-moyen));
    color: var(--blanc);
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.btn-submit:hover { opacity: 0.9; }

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* =========================================
   PAGE PAIEMENT (CORRIGÉE & CENTRÉE)
   ========================================= */
.paiement-container {
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.paiement-box {
    background: var(--blanc);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border-top: 5px solid var(--or-principal);
    color: var(--noir);
    overflow: hidden; /* Empêche tout débordement */
    width: 100%;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px dashed var(--or-principal);
}

.welcome-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--or-principal), var(--or-clair));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: var(--bleu-fonce);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.welcome-section h1 {
    color: var(--bleu-fonce);
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    line-height: 1.3;
}

.welcome-section .user-name {
    color: var(--or-principal);
    font-weight: 800;
}

.welcome-section p {
    color: #64748b;
    font-size: 1.05rem;
    margin-top: 10px;
    line-height: 1.5;
}

.paiement-title {
    text-align: center;
    color: var(--bleu-fonce);
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.paiement-title i {
    color: var(--or-principal);
    margin-right: 10px;
}

/* GRILLE DES COMPTES : Centrage parfait et contrôle strict */
.comptes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    width: 100%;
}

.compte-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    border: 3px solid var(--or-principal);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* L'image ne peut pas sortir de la carte */
    width: 100%;
}

.compte-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.compte-card h3 {
    color: var(--bleu-fonce);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.compte-card h3 i {
    color: var(--or-principal);
    margin-right: 8px;
}

.compte-img-container {
    width: 100%;
    max-height: 220px; /* Hauteur maximale stricte */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blanc);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

/* RÈGLE CRUCIALE POUR LES IMAGES DE COMPTE */
.compte-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* L'image s'adapte sans être coupée ni déformée */
    display: block;
    margin: 0 auto;
}

.compte-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu-moyen));
    color: var(--blanc);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    width: 100%;
    max-width: 250px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.4);
}

.instructions-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid var(--or-principal);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.instructions-box h4 {
    color: var(--bleu-fonce);
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.instructions-box h4 i {
    color: var(--or-principal);
    margin-right: 8px;
}

.instructions-box ol {
    margin-left: 20px;
    color: #92400e;
}

.instructions-box ol li {
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.instructions-box ol li strong {
    color: var(--bleu-fonce);
}

.paiement-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed var(--or-principal);
}

.paiement-form h3 {
    color: var(--bleu-fonce);
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.paiement-form h3 i {
    color: var(--or-principal);
    margin-right: 8px;
}

.btn-confirm {
    width: 100%;
    background: linear-gradient(135deg, var(--vert), #16a34a);
    color: var(--blanc);
    padding: 18px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

/* =========================================
   ADMIN DASHBOARD
   ========================================= */
.admin-body { background: #f1f5f9; color: var(--noir); }

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bleu-fonce);
    color: var(--blanc);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 3px solid var(--or-principal);
    z-index: 100;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--blanc);
    padding: 5px;
}

.sidebar-header h3 {
    color: var(--or-clair);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.sidebar-header span {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav ul { padding: 20px 0; }

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--or-clair);
    border-left-color: var(--or-principal);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--blanc);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.admin-header h1 {
    color: var(--bleu-fonce);
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--blanc);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid var(--or-principal);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.warning .stat-icon { background: #fef3c7; color: #d97706; }
.stat-card.success .stat-icon { background: #dcfce7; color: #16a34a; }
.stat-card.primary .stat-icon { background: #dbeafe; color: #2563eb; }

.stat-info h3 {
    font-size: 2rem;
    color: var(--bleu-fonce);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gris-texte);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.content-card {
    background: var(--blanc);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.card-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    color: var(--bleu-fonce);
    font-size: 1.3rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.95rem;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris-texte);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    color: var(--noir);
}

table th {
    background: var(--bleu-fonce);
    color: var(--blanc);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

table tr:hover { background: #f8fafc; }

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    transition: transform 0.2s;
}

.btn-action:hover { transform: scale(1.1); }
.btn-view { background: var(--bleu-clair); }
.btn-paid { background: var(--vert); }
.btn-delete { background: var(--rouge); }

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: rgba(0,0,0,0.4);
    color: var(--blanc);
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 4px solid var(--or-principal);
}

.footer p {
    margin: 10px 0;
    color: #cbd5e1;
}

.footer a { color: var(--or-clair); }

/* =========================================
   RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-menu li a {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .banner-cta {
        position: relative;
        bottom: auto;
        right: auto;
        text-align: center;
        padding: 20px;
        width: 100%;
    }
    
    .banner-img {
        max-height: 250px;
    }
    
    .admin-wrapper { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-main {
        margin-left: 0;
        padding: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box { max-width: 100%; }
    
    .comptes-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
    
    .welcome-section h1 {
        font-size: 1.4rem;
    }
    
    .paiement-box, .form-box {
        padding: 25px 20px;
    }
    /* Bouton WhatsApp direct dans le formulaire de paiement */
.btn-whatsapp-direct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.btn-whatsapp-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
    background: #128c7e;
    color: white;
}
/* Bouton WhatsApp direct dans la page de paiement */
.btn-whatsapp-direct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: white !important;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.btn-whatsapp-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
    background: #128c7e;
}
}