/* =========================================
   IMPORTATION DES POLICES
   ========================================= */
/* Importation de la police "Dancing Script" pour l'identité visuelle de la marque */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&display=swap');

/* =========================================
   VARIABLES GLOBALES (Palette de couleurs)
   ========================================= */
:root {
    --primary-blue: #73a6e3;   /* Bleu principal (boutons, bordures, menus) */
    --light-blue: #edf4fc;     /* Bleu très clair (fond général du site) */
    --gold-accent: #d4af37;    /* Couleur dorée (boutons d'action, panier) */
    --dark-text: #2b2b2b;      /* Couleur du texte sombre */
    --white: #ffffff;          /* Blanc pur (cartes, conteneurs) */
    --logo-font: 'Dancing Script', cursive; /* Nom de la police cursive */
}

/* =========================================
   STYLE GLOBAL : LA POLICE CURSIVE PARTOUT
   ========================================= */
/* Par défaut, tout le texte du site (titres, paragraphes, menus) utilise la police cursive */
* {
    font-family: var(--logo-font) !important;
}

/* =========================================
   EXCEPTION CRUCIALE : LES ZONES DE SAISIE
   ========================================= */
/* Pour que le client ou l'admin voie clairement ce qu'il tape, on force 
   une police standard et lisible UNIQUEMENT à l'intérieur des champs de texte, 
   des zones de message (textarea) et des listes déroulantes (select). */
input, textarea, select {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* =========================================
   CONFIGURATION DE LA PAGE & DU FOND
   ========================================= */
html, body {
    background-color: var(--light-blue);
    color: var(--dark-text);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-size: 1.05rem;
    height: 100%;
}

/* =========================================
   STRUCTURE GLOBALE (Layout & Footer)
   ========================================= */
/* Assure que la page prend toute la hauteur et pousse le footer tout en bas sans espace blanc */
.page-wrapper, .app-container, .layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.content-area, .main-content, .layout-content {
    flex: 1; 
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Le Footer en bas de page (collé sans blanc en dessous) */
.site-footer {
    background-color: #6da2d1;
    color: white;
    text-align: center;
    padding: 1.5rem;
    border-top: 4px solid #d4af37; /* Bordure dorée signature */
    font-size: 0.95rem;
    margin-top: auto; 
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   BOUTONS COMMUNS DU SITE
   ========================================= */
.btn-feather {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, opacity 0.2s;
    font-size: 1.2rem; /* Taille augmentée pour l'harmonie de la police cursive */
}

.btn-feather:hover {
    background-color: #5890d0;
    opacity: 0.9;
    color: white;
}

.btn-gold {
    background-color: var(--gold-accent);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 1.2rem;
}

.btn-gold:hover {
    background-color: #c19b2e;
    color: white;
}

/* =========================================
   BARRE DE NAVIGATION
   ========================================= */
.navbar-custom {
    background-color: var(--white, #ffffff);
    border-bottom: 2px solid var(--primary-blue, #2c3e50);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(115, 166, 227, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-blue, #2c3e50);
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 60px;
    object-fit: contain;
    mix-blend-mode: multiply; /* Supprime le fond blanc des images de logo */
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link-custom {
    text-decoration: none;
    color: var(--dark-text, #333333);
    font-weight: bold;
    transition: color 0.2s;
    font-size: 1.4rem; /* Plus grand pour la police cursive */
}

.nav-link-custom:hover {
    color: var(--primary-blue, #2c3e50);
}

/* Menu déroulant du Catalogue */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white, #ffffff);
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 6px;
    padding: 0.5rem 0;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--dark-text, #333333);
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 1rem;
}

.dropdown-content a:hover {
    background-color: rgba(115, 166, 227, 0.1);
    color: var(--primary-blue, #2c3e50);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* =========================================
   ESPACE BACK-OFFICE / ADMIN
   ========================================= */
.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header-section h1 {
    color: var(--primary-blue, #2c3e50);
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.admin-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-blue, #2c3e50);
}

.admin-card h3 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-blue, #2c3e50);
}

.admin-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background-color: #f8f9fa;
    color: var(--primary-blue, #2c3e50);
    font-weight: bold;
}

.btn-edit, .btn-delete {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    margin-right: 0.5rem;
}

.btn-edit { background-color: #ffc107; color: #212529; }
.btn-delete { background-color: #dc3545; color: white; }

/* Layout général du Back-Office */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f4f7fc;
    margin: 0;
}

.admin-sidebar {
    width: 280px;
    background-color: var(--primary-blue, #2c3e50);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.admin-logo-container {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-logo-img {
    max-width: 140px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.admin-nav-link {
    color: #b8c7ce;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    display: block;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: bold;
}

.admin-nav-separator {
    margin: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-home-link {
    color: #ffcc00 !important;
    font-weight: bold;
}

.admin-main-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    box-sizing: border-box;
}

/* =========================================
   BADGES DE STATUT ADMIN
   ========================================= */
.badge-pending {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* =========================================
   STABILISATION INSTANTANÉE (FORMULAIRES & CARTES)
   ========================================= */
.profile-container {
    max-width: 1400px !important;
    margin: 2rem auto !important;
    padding: 0 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.profile-card {
    background: #ffffff !important;
    padding: 3rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(115, 166, 227, 0.15) !important;
    width: 100% !important;
    max-width: 100% !important; /* Prend toute la largeur disponible de la page */
    box-sizing: border-box !important;
    margin-bottom: 2rem !important;
}

.profile-title {
    color: #73a6e3 !important;
    text-align: center !important;
    font-size: 3.5rem !important;
    margin-bottom: 2rem !important;
    font-family: var(--logo-font) !important;
}

.form-group {
    margin-bottom: 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
}

.form-group label {
    margin-bottom: 0.4rem !important;
    color: var(--dark-text) !important;
    font-weight: bold !important;
}

.form-control {
    padding: 0.8rem 2.8rem 0.8rem 1rem !important;
    border: 2px solid var(--light-blue) !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #fff !important;
}

.form-control:focus {
    border-color: var(--primary-blue) !important;
}

/* Gestion du bouton œil sur les mots de passe */
.password-container {
    position: relative !important;
    width: 100% !important;
}

.password-toggle-btn {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 10 !important;
}

.password-toggle-btn:hover {
    color: var(--primary-blue) !important;
}