/* ==========================================================================
   0. POLICES LOCALES
   ========================================================================== */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}

/* ==========================================================================
   1. VARIABLES ET RÈGLES GÉNÉRALES
   ========================================================================== */
:root { 
    --dark: #2c3e50; 
    --accent: #3498db; 
    --danger: #e74c3c; 
    --gold: #f1c40f; 
    --teal: #48d1cc;
    --card-bg: rgba(255, 255, 255, 0.9);
}

body { 
    margin: 0; 
    font-family: 'Montserrat', sans-serif; 
    background: #f0f2f5; 
    color: #333; 
    line-height: 1.6;
}

/* Base container (utilisé par toutes les pages) */
.container { padding: 20px 5%; max-width: 1200px; margin: 0 auto; }

/* ==========================================================================
   2. PAGES DE CONNEXION (index.php / verification.php)
   ========================================================================== */
.body-login {
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    background: url('../img/themes/background_login.jpg') no-repeat center center fixed;
    background-size: cover;
}

.login-container {
    background: var(--card-bg); 
    padding: 40px; 
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2); 
    text-align: center;
    max-width: 600px; 
    width: 95%; 
    animation: fadeIn 0.8s ease-out;
}

.input-group { text-align: left; margin-bottom: 20px; }

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%; 
    padding: 16px;       
    font-size: 1.7rem;   
    border: 2px solid #ddd; 
    border-radius: 10px;
    box-sizing: border-box; 
    font-family: inherit;
    transition: 0.3s;
}

.input-group input:focus { border-color: var(--accent); outline: none; background: #fff; }

/* Champ spécifique 2FA */
.input-code-2fa {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 2.5rem !important; 
    letter-spacing: 12px !important;
    padding: 15px 0 !important;
    margin-bottom: 25px !important;
    border: 2px solid var(--accent) !important;
    border-radius: 10px;
    font-weight: bold !important;
    background: #f9f9f9 !important;
}

.login-button {
    background: var(--dark); 
    color: white; 
    padding: 18px;       
    border: none;
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 1.1rem;
    cursor: pointer; 
    width: 100%; 
    transition: 0.3s;
    margin-top: 10px;
}

/* ==========================================================================
   3. MODULE ALBUMS & MÉDIAS
   ========================================================================== */
.body-albums { background-color: #f0f2f5; }

.breadcrumb {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.grid-exploration { 
    display: grid !important; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-top: 20px;
}

.card-folder { 
    background: white; 
    padding: 20px; 
    border-radius: 15px; 
    text-align: center; 
    text-decoration: none; 
    color: var(--dark); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: 0.3s;
    border-bottom: 3px solid var(--teal);
}
.card-folder:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.folder-icon { font-size: 40px; display: block; margin-bottom: 10px; }

.media-item {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 250px; 
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   4. MODULE GÉNÉALOGIE
   ========================================================================== */
.genealogy-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.styled-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.styled-table thead tr { background-color: #4a5568; color: #ffffff; text-align: left; }
.styled-table th, .styled-table td { padding: 15px; border-bottom: 1px solid #eee; }

/* Styles formulaires généalogie */
.form-genealogy { display: flex; flex-direction: column; gap: 15px; }
.input-field { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; }

/* ==========================================================================
   5. DÉTAILS FICHE MEMBRE
   ========================================================================== */
.fiche-header-banner {
    background: var(--dark);
    color: white;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.avatar-large {
    width: 90px; height: 90px;
    background: var(--teal);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; border: 4px solid rgba(255,255,255,0.2);
}

/* ==========================================================================
   6. POSTE DE COMMANDEMENT (ADMIN)
   ========================================================================== */
.main-command-wrapper { display: flex; flex-direction: row; align-items: stretch; gap: 20px; }
.side-menu { background: #252525; border: 2px solid var(--teal); border-radius: 12px; }
#content-view { background: #000; border: 1px solid var(--teal); }

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