﻿/* ===================================== */
/* 1. RÉINITIALISATION ET FOND DE PAGE (FUSIONNÉ ET CORRIGÉ) */
/* ===================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    
    /* Styles pour l'arrière-plan thématique */
    background-image: url('pexels-pixabay-40784.jpg'); /* Chemin vers votre image */
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    /* Couleur de secours si l'image ne charge pas */
    background-color: #f0f8ff; 
}

/* Conteneur principal pour centrer le contenu */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ===================================== */
/* 2. TYPOGRAPHIE ET TITRES */
/* ===================================== */
h1, h2, h3 {
    color: #004a99; /* Bleu foncé pour les titres */
    border-bottom: 2px solid #e0e6eb;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8em;
}

a {
    color: #007bff; /* Bleu primaire pour les liens */
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ===================================== */
/* 3. CARTES ET CONTENEURS (Styles 'Card') */
/* ===================================== */

.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Ombre douce et moderne */
    margin-bottom: 25px;
    border-left: 5px solid #007bff; /* Bordure colorée pour l'accentuation */
}

.login-card {
    max-width: 400px;
    margin: 50px auto;
    border-left: 5px solid #004a99; /* Bleu plus foncé */
}

/* ===================================== */
/* 4. FORMULAIRES ET CHAMPS DE SAISIE */
/* ===================================== */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-input, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d2db;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus, textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* ===================================== */
/* 5. BOUTONS */
/* ===================================== */

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #d1d1d1;
    text-decoration: none;
}

/* ===================================== */
/* 6. TABLEAUX DE DONNÉES */
/* ===================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden; 
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background-color: #004a99; 
    color: white;
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8fbfd;  
}

.data-table tbody tr:hover {
    background-color: #eaf1f7;
}

/* ===================================== */
/* 7. LAYOUT ET GRILLE D'ACTIONS */
/* ===================================== */

.welcome-banner {
    text-align: center;
    margin-bottom: 30px;
}

.banner-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));  
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    display: block;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; 
    color: #333;
    border: 1px solid #e0e0e0;
}

.action-card:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.action-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #004a99;
    margin-bottom: 5px;
}

.action-text {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
}

.action-more {
    display: block;
    font-weight: 600;
    color: #007bff;
}

/* ===================================== */
/* 8. MESSAGE URGENT */
/* ===================================== */

.urgent-message {
    border-left: 5px solid #e74c3c; 
    background-color: #fff0f0; 
    margin-bottom: 30px;
}

.urgent-message h2 {
    color: #c0392b;
    border-bottom: 1px solid #f9d7d7;
    margin-top: 0;
}

.message-content {
    text-align: justify;
}

.social-link-container {
    text-align: center;
    padding: 20px 0;
}

.facebook-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

/* Utilities pour les icônes */
.icon-small {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}
.icon-medium {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.visually-hidden { 
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================== */
/* MENU DE NAVIGATION PRINCIPAL */
/* ===================================== */

.main-nav {
    background-color: #004a99; 
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; 
}

.main-nav li {
    position: relative; 
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #007bff; 
}


/* ===================================== */
/* SOUS-MENU DÉROULANT (.submenu) */
/* ===================================== */

.submenu {
    /* RÈGLE CRITIQUE : Masquer le menu */
    display: none !important;
    
    /* RETIRER : opacity: 1; et visibility: visible; — ils annulent le masquage! */
    transition: none;
    
    /* Le reste des propriétés de positionnement doit rester */
    position: absolute;
    top: 100%;  
    left: 0;
    background-color: #007bff;  
    min-width: 200px;  
    z-index: 1000;  
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 4px 4px;
}




/* ===================================== */
/* SOUS-MENU DÉROULANT (.submenu) */
/* ===================================== */

.submenu {
    /* ⚠️ RÈGLE CRITIQUE : Masquer le menu avec FORÇAGE */
    display: none !important; 
    
    /* Le reste des propriétés de positionnement */
    position: absolute;
    top: 100%;  
    left: 0;
    background-color: #007bff;  
    min-width: 200px;  
    z-index: 1000;  
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 4px 4px;
}

/* RÈGLES D'EMPÎLEMENT VERTICAL */
.submenu li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: block; 
    width: 100%;
}

.submenu a {
    display: block; 
    padding: 10px 20px;
    color: white;
    font-weight: normal;
}

.submenu a:hover {
    background-color: #004a99;
}


/* AFFICHAGE AU SURVOL : HAUTE SPÉCIFICITÉ ET FORCE DE BLOCAGE */
/* Doit aussi avoir !important pour contrer le masquage !important */
.main-nav li.has-submenu:hover .submenu {
    display: block !important; 
}

/* AFFICHAGE AU SURVOL */
.main-nav li.has-submenu:hover .submenu {
    /* RÈGLES D'AFFICHAGE SIMPLES ET EFFICACES */
    display: block; /* Affiche le menu au survol */
    
    /* Assurez-vous d'avoir retiré tous les !important de ce fichier */
}

/* Gérer les petits écrans */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column; 
        width: 100%;
    }
    .submenu {
        position: static; 
        width: 100%;
        border-radius: 0;
    }
    .main-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}
#contact {
    /* ... */
    background: #c9d0de; /* Premier background */
    background: #e4ecf2; /* Deuxième background (surcharge le premier) */
    /* ... */
}
.payment-form-container {
    width: 600px;
    max-width: 95%; /* Mieux pour les petits écrans */
    margin: 30px auto; 
    padding: 25px 35px; /* Augmenter le padding horizontal */
    
    background-color: #FFFFFF; /* Fond blanc très clair */
    border: 1px solid #E0E0E0; /* Bordure très fine et claire */
    border-radius: 12px; /* Coins plus arrondis */
    
    /* Ombre subtile, remplace l'ancienne ombre foncée */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); 
    
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Police moderne */
}


/* ================================================= */
/* 1. STYLES DU CONTENEUR GRISÉ (.liste-abonnements-tuiles) */
/* ================================================= */
.liste-abonnements-tuiles {
    /* Propriétés de Flexbox pour la disposition */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    
    /* CENTRAGE ET LARGEUR MAXIMALE DU BLOC GRISÉ */
    max-width: 1200px; /* Largeur maximale pour le conteneur centré */
    margin: 0 auto; /* Centrage horizontal du bloc */
    
    /* Répartition des tuiles sur la ligne */
    justify-content: space-between; 
    
    /* Fond et Padding */
    background-color: #f0f0f0; /* Fond grisonnant */
    padding: 20px; 
    border-radius: 8px;
    
    box-sizing: border-box; 
    width: 100%;
}

/* ================================================= */
/* 2. STYLES DE LA TUILE (élément <a>) - MANQUANTS DANS VOTRE CODE */
/* ================================================= */
.abonnement-tuile {
    /* 🔑 FORCE LA LARGEUR EXACTEMENT ÉGALE (3 par ligne) */
    flex-basis: calc((100% - 40px) / 3) !important; 
    width: calc((100% - 40px) / 3) !important; /* Ajout de !important pour écraser les conflits */
    
    min-width: 250px; /* Conservez-le, mais il ne devrait pas s'appliquer ici */
    
    /* HAUTEUR UNIFORME : Rend la tuile un conteneur Flexbox vertical */
    display: flex; 
    flex-direction: column;
    min-height: 180px; 
    
    /* Style visuel */
    box-sizing: border-box; 
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    
    /* ... (le reste des styles) ... */
}

/* 3. Ajustement du survol */
.abonnement-tuile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ================================================= */
/* 4. STYLES DES ÉLÉMENTS INTERNES */
/* ================================================= */

/* HAUTEUR UNIFORME : Le corps prend l'espace restant dans la tuile */
.tuile-body {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.tuile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.icone-compteur {
    font-size: 1.5em;
}

.numero-abonnement {
    font-weight: bold;
    font-size: 1.1em;
    color: #007bff;
}

.adresse-principale {
    margin: 5px 0;
    font-size: 0.9em;
    font-weight: 500;
}

/* HAUTEUR UNIFORME : Pousse le statut tout en bas, assurant l'alignement */
.statut-acces {
    margin-top: auto; /* Pousse l'élément vers le bas si la tuile est plus haute */
    font-size: 0.8em;
    font-style: italic;
    color: green;
    text-align: right;
}

/* ================================================= */
/* 5. STYLE POUR LES TUILES BLOQUÉES */
/* ================================================= */
.tuile-bloquee {
    background-color: #fefefe;
    border-color: #ffaaaa;
    color: #888;
    cursor: not-allowed;
    opacity: 0.8;
}

.tuile-bloquee .statut-acces {
    color: red;
}

.tuile-bloquee:hover {
    transform: none;
    box-shadow: none;
}
