/**
 * ATLAS - Styles Frontend Premium Complet
 * Charte graphique : #73C1DA (Ciel), #7595A2 (Ardoise), #2F2F1F (Sombre)
 */

:root {
    --atlas-sky: #73C1DA;
    --atlas-slate: #7595A2;
    --atlas-dark: #2F2F1F;
    --atlas-white: #ffffff;
    --atlas-bg: #F8FAFB;
    --atlas-shadow: 0 12px 30px rgba(47, 47, 31, 0.08);
    --atlas-radius: 20px;
}

/* Container Global */
.atlas-listing-container, 
.atlas-frontend-form-container {
    max-width: 1100px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 0 15px;
}

/* --- SÉLECTEUR DE DEVISE --- */
.atlas-currency-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.switcher-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--atlas-slate);
}

.switcher-buttons {
    display: flex;
    background: #ebeef0;
    padding: 3px;
    border-radius: 30px;
}

.sw-btn {
    border: none;
    padding: 5px 14px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    background: transparent;
    color: var(--atlas-slate);
}

.sw-btn.active {
    background: var(--atlas-white);
    color: var(--atlas-sky);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Titre de page */
.atlas-page-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--atlas-dark);
    margin-bottom: 35px;
}

/* --- GRILLE D'ANNONCES --- */
.atlas-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

/* --- CARTE COMMUNE (TRAJETS & EXPÉDITIONS) --- */
.atlas-card {
    background: var(--atlas-white);
    border-radius: var(--atlas-radius);
    overflow: hidden;
    box-shadow: var(--atlas-shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    position: relative;
}

.atlas-card:hover {
    transform: translateY(-6px);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
}

/* Itinéraire (Trajets) */
.card-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.city-name { font-size: 19px; font-weight: 800; color: var(--atlas-dark); }
.route-icon { font-size: 20px; color: var(--atlas-sky); }

/* Itinéraire (Expéditions - Titre et Villes plus petites) */
.card-title {
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--atlas-dark);
    margin: 0 0 10px 0;
}

.card-route.sub {
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.city-name-small { font-size: 15px; font-weight: 600; color: var(--atlas-slate); }
.route-icon-small { font-weight: bold; color: var(--atlas-dark); }

/* --- CORPS DE CARTE FLEX (Infos gauche | Prix-Poids droite) --- */
.card-body-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F9FBFC;
    padding: 12px 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.card-meta-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--atlas-slate);
    font-size: 13px;
    font-weight: 500;
}

.meta-item .dashicons {
    color: var(--atlas-sky);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* --- LA ZONE DE DROITE (ZONE JAUNE DANS TON IMAGE) --- */
.card-price-right {
    text-align: right;
    padding-left: 12px;
    border-left: 1px solid #eef2f4;
    min-width: 90px;
}

.price-val {
    font-size: 17px;
    font-weight: 900;
    color: var(--atlas-dark);
    line-height: 1.1;
    white-space: nowrap;
}

/* Pour le poids dans les expéditions, on utilise le bleu ciel */
.shipment-card .price-val {
    color: var(--atlas-sky);
}

.price-unit {
    font-size: 9px;
    color: var(--atlas-slate);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

/* Masquer l'ancien badge qui s'affichait au survol */
.card-badge.weight { display: none !important; }

/* Auteur */
.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--atlas-slate);
    margin-top: 5px;
}

.card-author img {
    border-radius: 50%;
    border: 1.5px solid var(--atlas-sky);
}

/* Boutons d'action */
.card-action {
    padding: 0 25px 25px;
}

.btn-view {
    display: block;
    text-align: center;
    background: var(--atlas-sky);
    color: white;
    padding: 13px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: 0.2s;
}

/* Bouton Noir pour les expéditions */
.btn-view.dark {
    background: var(--atlas-dark);
}

.btn-view:hover {
    filter: brightness(1.1);
}

/* --- FORMULAIRES --- */
.atlas-frontend-form {
    background: white;
    padding: 35px;
    border-radius: var(--atlas-radius);
    box-shadow: var(--atlas-shadow);
}

.atlas-frontend-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.atlas-btn {
    background: var(--atlas-sky);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.atlas-btn:hover { background: var(--atlas-dark); }

/* Responsive Mobile */
@media (max-width: 768px) {
    .atlas-cards-grid { grid-template-columns: 1fr; }
    .atlas-frontend-form .form-row { grid-template-columns: 1fr; }
}

/* --- PAGE DE DÉTAILS (SINGLE) --- */
.atlas-single-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.atlas-single-card {
    background: #fff;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.atlas-category-tag {
    background: var(--atlas-bg);
    color: var(--atlas-sky);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.atlas-single-header h1 {
    font-size: 36px;
    font-weight: 900;
    margin: 15px 0 30px;
    color: var(--atlas-dark);
}

.atlas-single-route {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--atlas-bg);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.atlas-single-route .label { font-size: 12px; color: var(--atlas-slate); text-transform: uppercase; display: block; }
.atlas-single-route .name { font-size: 24px; font-weight: 800; color: var(--atlas-dark); }
.atlas-single-route .route-divider { font-size: 30px; }

.atlas-single-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 15px;
}

.info-box.highlight { background: var(--atlas-dark); color: #fff; border: none; }
.info-box.highlight span, .info-box.highlight strong { color: var(--atlas-sky); }

.atlas-single-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 30px;
}

.author-info { display: flex; align-items: center; gap: 20px; }
.author-info img { border-radius: 50%; }
.btn-contact {
    background: var(--atlas-sky);
    color: #fff;
    padding: 15px 30px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 800;
}

/* --- LAYOUT SINGLE ATLAS --- */
.atlas-single-wrapper { background: #f8fafc; padding-bottom: 60px; }
.atlas-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Bannière */
.atlas-single-banner { 
    background: var(--atlas-dark); 
    color: white; 
    padding: 60px 0; 
    text-align: center;
    background: linear-gradient(135deg, #2F2F1F 0%, #45452f 100%);
    margin-bottom: -40px;
}
.atlas-badge-cat { background: var(--atlas-sky); padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.atlas-single-banner h1 { font-size: 42px; margin: 20px 0; font-weight: 900; color: #fff; }
.atlas-banner-route { font-size: 24px; font-weight: 300; opacity: 0.9; }
.atlas-banner-route span { color: var(--atlas-sky); font-weight: 900; margin: 0 15px; }

/* Layout 2 colonnes */
.atlas-single-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }

.atlas-details-card, .atlas-author-card { 
    background: white; 
    border-radius: 20px; 
    padding: 30px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

/* Infos clés */
.atlas-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.info-item { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid #f1f5f9; border-radius: 12px; }
.info-item span.dashicons { font-size: 24px; color: var(--atlas-sky); }
.info-item strong { display: block; font-size: 12px; color: var(--atlas-slate); text-transform: uppercase; }
.info-item span { font-size: 16px; font-weight: 700; color: var(--atlas-dark); }

.price-highlight { background: #f0f9ff; border-color: var(--atlas-sky); }

/* Sidebar Auteur */
.atlas-single-sidebar { position: sticky; top: 20px; }
.atlas-author-card { text-align: center; }
.atlas-author-card img { border-radius: 50%; border: 4px solid #f8fafc; margin-bottom: 15px; }
.atlas-author-card h4 { margin: 0; font-size: 20px; color: var(--atlas-dark); }
.author-status { font-size: 12px; color: #10b981; font-weight: 700; margin: 5px 0 15px; }
.author-stats { margin-bottom: 25px; font-size: 14px; }

.atlas-btn-chat { 
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--atlas-sky); color: white; padding: 15px; border-radius: 12px;
    text-decoration: none; font-weight: 800; transition: 0.3s;
}
.atlas-btn-chat:hover { background: var(--atlas-dark); transform: translateY(-3px); }

/* Description */
.atlas-description { margin-top: 40px; padding-top: 30px; border-top: 1px solid #f1f5f9; }
.atlas-description h3 { margin-bottom: 15px; }
.atlas-description .content { color: #475569; line-height: 1.6; }

@media (max-width: 768px) {
    .atlas-single-layout { grid-template-columns: 1fr; }
    .atlas-single-banner h1 { font-size: 32px; }
}

/* --- NOUVEAU DESIGN SINGLE ATLAS --- */

/* Bannière Sky avec Filigrane */
.atlas-single-banner {
    background-color: var(--atlas-sky);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
    margin-bottom: 60px;
}

.atlas-filigree {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-size: 120px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1); /* Filigrane très discret */
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.atlas-single-banner .atlas-container {
    position: relative;
    z-index: 2;
}

.atlas-badge-cat {
    background: rgba(255,255,255,0.2);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.atlas-single-banner h1 {
    font-size: 48px;
    font-weight: 900;
    margin: 20px 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.atlas-banner-route {
    font-size: 26px;
    font-weight: 300;
}

.atlas-banner-route .arrow {
    font-weight: 900;
    margin: 0 20px;
    color: var(--atlas-dark);
}

/* Layout Centré et Equal Height */
.atlas-single-layout {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 0px; /* Chevauchement sur la bannière */
}

.atlas-flex-column {
    flex: 1;
    max-width: 500px;
    display: flex; /* Permet l'equal height */
}

.atlas-equal-height {
    width: 100%;
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Espace équilibré */
}

/* Infos Clés */
.atlas-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-box-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #F8FAFB;
    border-radius: 15px;
    border: 1px solid #edf2f4;
}

.info-box-item .dashicons { color: var(--atlas-sky); font-size: 22px; }
.info-box-item strong { display: block; font-size: 11px; color: var(--atlas-slate); }
.info-box-item span { font-size: 16px; font-weight: 700; color: var(--atlas-dark); }

.price-box { background: #E6F4F8; border-color: var(--atlas-sky); }

/* Auteur */
.author-header { text-align: center; }
.author-header img { border-radius: 50%; border: 4px solid var(--atlas-bg); margin-bottom: 15px; }
.author-header h4 { font-size: 22px; margin: 0; color: var(--atlas-dark); }

.verified-badge { font-size: 12px; color: #10b981; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 5px; }

.author-rating-real {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
}

.author-rating-real .score { font-weight: 900; color: var(--atlas-dark); margin: 0 5px; }
.author-rating-real .count { font-size: 14px; color: var(--atlas-slate); }

.atlas-btn-chat {
    background: var(--atlas-sky);
    color: white;
    padding: 18px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.atlas-btn-chat:hover { background: var(--atlas-dark); transform: scale(1.02); }

@media (max-width: 900px) {
    .atlas-single-layout { flex-direction: column; align-items: center; margin-top: 20px; }
    .atlas-flex-column { width: 100%; }
}

/* --- DASHBOARD UTILISATEUR --- */
.atlas-dashboard-container {
    max-width: 900px;
    margin: 40px auto;
}

.dashboard-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--atlas-shadow);
}

.dashboard-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: var(--atlas-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--atlas-bg);
    padding-bottom: 10px;
}

.dashboard-section h3 .dashicons { color: var(--atlas-sky); }

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #F9FBFC;
    border-radius: 12px;
    border: 1px solid #edf2f4;
}

.item-info { display: flex; flex-direction: column; }
.item-info strong { font-size: 16px; color: var(--atlas-dark); }
.item-info span { font-size: 13px; color: var(--atlas-slate); }

.btn-delete {
    color: #e11d48; /* Rouge alerte */
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    transition: 0.2s;
}

.btn-delete:hover {
    background: #fff1f2;
    border-color: #e11d48;
}

.empty-msg { font-style: italic; color: var(--atlas-slate); text-align: center; padding: 20px; }

/* --- DASHBOARD PRO STYLE --- */
.atlas-dashboard-wrapper {
    display: flex;
    background: #F8FAFB;
    min-height: 90vh;
    border-radius: 30px;
    overflow: hidden;
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.atlas-db-sidebar {
    width: 260px;
    background: #fff;
    padding: 30px 20px;
    border-right: 1px solid #edf2f4;
    display: flex;
    flex-direction: column;
}

.db-logo { font-size: 22px; font-weight: 900; margin-bottom: 40px; color: var(--atlas-dark); }
.db-logo span { font-size: 10px; color: var(--atlas-slate); }

.db-menu { flex-grow: 1; }
.db-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--atlas-slate);
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: 0.3s;
}

.db-menu a.active, .db-menu a:hover {
    background: #5D5FEF; /* Couleur Purple moderne comme l'image */
    color: white;
}

/* Header & Main */
.atlas-db-main { flex-grow: 1; padding: 40px; }
.db-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.db-search-bar { position: relative; width: 300px; }
.db-search-bar input { width: 100%; padding: 10px 40px; border-radius: 12px; border: none; background: #fff; }
.db-search-bar span { position: absolute; left: 12px; top: 10px; color: var(--atlas-slate); }

/* Stats */
.db-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 30px; }
.stat-card {
    background: #fff; padding: 25px; border-radius: 20px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
}
.stat-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.stat-icon.sky { background: #e0f2fe; color: #0ea5e9; }
.stat-icon.green { background: #dcfce7; color: #22c55e; }
.stat-icon.dark { background: #f1f5f9; color: #64748b; }

/* Table */
.db-content-box { background: #fff; border-radius: 25px; padding: 30px; box-shadow: 0 10px 25px rgba(0,0,0,0.02); }
.db-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.db-table th { text-align: left; padding: 15px; border-bottom: 1px solid #f1f5f9; color: var(--atlas-slate); font-size: 13px; }
.db-table td { padding: 20px 15px; border-bottom: 1px solid #f8fafc; font-size: 14px; }

.status-badge { padding: 5px 12px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.status-badge.active { background: #dcfce7; color: #16a34a; }



/* Boutons plus petits pour le tableau */
.btn-sm { padding: 5px 12px; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 700; background: #eee; color: #333; }
.btn-sm.edit { background: #e0f2fe; color: #0369a1; }
.btn-sm.delete { background: #fee2e2; color: #b91c1c; }

/* Messagerie */
.chat-item { padding: 15px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: 0.2s; }
.chat-item:hover { background: #f8fafc; }
.chat-item strong { display: block; color: var(--atlas-dark); }
.chat-item p { margin: 5px 0 0; font-size: 13px; color: var(--atlas-slate); }

/* Notifications */
.notif-item { display: flex; gap: 15px; padding: 15px; background: #fff; border-radius: 12px; border-left: 4px solid var(--atlas-sky); margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.notif-item.unread { background: #f0f9ff; }


.db-footer-menu {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e11d48 !important; /* Rouge */
    text-decoration: none;
    font-weight: 700;
}

.atlas-auth-link {
    background: var(--atlas-sky);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
}

.profile-form input {
    background: #f8fafc;
    border: 1px solid #edf2f4;
    margin-bottom: 15px;
}

/* --- MESSAGERIE INBOX --- */
.atlas-inbox { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.inbox-item { 
    display: flex; gap: 15px; padding: 20px; background: #fcfcfc; 
    border-radius: 15px; border: 1px solid #f1f5f9; transition: 0.3s;
}
.inbox-item:hover { border-color: var(--atlas-sky); background: #fff; }
.inbox-avatar img { border-radius: 50%; }
.inbox-body { flex: 1; }
.inbox-meta { display: flex; justify-content: space-between; margin-bottom: 5px; }
.inbox-meta strong { color: var(--atlas-dark); font-size: 15px; }
.inbox-meta .date { font-size: 12px; color: var(--atlas-slate); }
.inbox-body p { font-size: 14px; color: #475569; margin: 0 0 10px; line-height: 1.5; }
.btn-reply { font-size: 12px; font-weight: 700; color: var(--atlas-sky); text-decoration: none; text-transform: uppercase; }

/* --- NOTIFICATIONS --- */
.notif-card { 
    display: flex; gap: 15px; padding: 15px; border-radius: 12px; 
    background: #fff; border: 1px solid #f1f5f9; margin-bottom: 10px; transition: 0.3s;
}
.notif-card.unread { background: #f0f9ff; border-left: 4px solid var(--atlas-sky); }
.notif-icon { color: var(--atlas-sky); }
.notif-content strong { display: block; font-size: 14px; color: var(--atlas-dark); }
.notif-content p { font-size: 13px; color: var(--atlas-slate); margin: 3px 0; }
.notif-content small { font-size: 11px; opacity: 0.6; }

.empty-state { text-align: center; padding: 40px; color: var(--atlas-slate); }
.empty-state .dashicons { font-size: 48px; width: 48px; height: 48px; opacity: 0.2; margin-bottom: 10px; }

/* Badge Rouge Notification */
.badge-red {
    background: #e11d48;
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 800;
}

/* Réponse Rapide dans le Chat */
.quick-reply {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.quick-reply input {
    flex: 1;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    margin-bottom: 0 !important;
}
.quick-reply button {
    background: var(--atlas-sky);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Notifications Cliquables */
.notif-link { text-decoration: none !important; display: block; }
.notif-card.unread { background: #f0f9ff; border-left: 4px solid var(--atlas-sky); }

/* --- MESSENGER LAYOUT --- */
.chat-main-box { padding: 0 !important; overflow: hidden; height: 600px; }
.atlas-messenger { display: flex; height: 100%; }

.messenger-contacts { width: 280px; border-right: 1px solid #eee; overflow-y: auto; background: #fafafa; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 15px; text-decoration: none; color: #333; border-bottom: 1px solid #f0f0f0; }
.contact-item:hover, .contact-item.active { background: #fff; border-left: 4px solid var(--atlas-sky); }
.contact-item img { border-radius: 50%; }

.messenger-body { flex: 1; display: flex; flex-direction: column; background: #fff; }
.chat-header { padding: 15px 25px; border-bottom: 1px solid #eee; font-size: 18px; }
.chat-window { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f0f2f5; }

/* Bulles WhatsApp */
.msg-bubble { max-width: 70%; padding: 10px 15px; border-radius: 15px; font-size: 14px; line-height: 1.4; position: relative; }
.msg-bubble.me { align-self: flex-end; background: var(--atlas-sky); color: white; border-bottom-right-radius: 2px; }
.msg-bubble.them { align-self: flex-start; background: white; color: #333; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.chat-input-area { padding: 20px; border-top: 1px solid #eee; display: flex; gap: 10px; }
.chat-input-area input { flex: 1; border: 1px solid #ddd !important; border-radius: 25px !important; padding: 10px 20px !important; }
.chat-input-area button { background: var(--atlas-sky); color: white; border: none; padding: 0 20px; border-radius: 25px; font-weight: bold; cursor: pointer; }
.chat-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #aaa; }

/* --- HEADER SAAS POUR ELEMENTOR --- */
.at-header-saas {
    background-color: #73C1DA;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.at-header-saas .at-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Forcer la taille du logo */
.at-logo img {
    height: 50px !important;
    width: auto !important;
    display: block;
}

/* Menu */
.at-menu { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; }
.at-menu a { color: white; text-decoration: none; font-weight: 700; font-size: 15px; }

/* Avatar et Dropdown */
.at-profile-wrapper { position: relative; }
.at-avatar { 
    display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.2); 
    padding: 5px 12px; border-radius: 50px; cursor: pointer;
}
.at-avatar img { border-radius: 50%; border: 2px solid white; width: 35px; height: 35px; }
.at-arrow { color: white; font-size: 10px; }

.at-dropdown {
    position: absolute; top: 120%; right: 0; width: 220px; background: white; 
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 15px 0;
    display: none; z-index: 9999;
}
.at-dropdown-header { padding: 0 20px 10px; border-bottom: 1px solid #f0f0f0; margin-bottom: 10px; }
.at-dropdown-header strong { display: block; font-size: 14px; color: #2F2F1F; }
.at-dropdown-header span { font-size: 11px; color: #7595A2; }

.at-dropdown ul { list-style: none; margin: 0; padding: 0; }
.at-dropdown ul li a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; text-decoration: none; color: #555; font-weight: 600; font-size: 13px; }
.at-dropdown ul li a:hover { background: #f8fafc; color: #73C1DA; }
.at-logout a { color: #e11d48 !important; }

/* Boutons */
.at-btn-login { color: white; text-decoration: none; font-weight: 700; margin-right: 15px; }
.at-btn-signup { background: #2F2F1F; color: white; padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 700; }

/* --- FOOTER DESKTOP --- */
.at-desktop-footer {
    background: #fff;
    padding: 60px 0 30px;
    border-top: 1px solid #edf2f4;
    margin-top: 50px;
}

.at-footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.at-footer-logo img { height: 40px; margin-bottom: 15px; }
.at-footer-logo p { color: #7595A2; font-size: 14px; line-height: 1.6; max-width: 300px; }
.at-footer-links h4 { color: #2F2F1F; margin-bottom: 20px; font-weight: 800; }
.at-footer-links ul { list-style: none; padding: 0; }
.at-footer-links li { margin-bottom: 10px; }
.at-footer-links a { color: #7595A2; text-decoration: none; font-size: 14px; transition: 0.3s; }
.at-footer-links a:hover { color: #73C1DA; }

.at-footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #f1f5f9;
    color: #cbd5e1;
    font-size: 12px;
}

/* --- BARRE MOBILE (TYPE APP) --- */
.at-mobile-nav {
    display: none; /* Caché par défaut */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 999999;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* Support iPhone récents */
}

.at-nav-item {
    text-decoration: none;
    color: #7595A2;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    transition: 0.3s;
}

.at-nav-item .dashicons {
    font-size: 24px;
    margin-bottom: 4px;
    transition: 0.3s;
}

.at-nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* État Actif */
.at-nav-item.active, .at-nav-item:hover {
    color: #73C1DA;
}

/* Bouton Central (Optionnel pour le mettre en valeur) */
.at-nav-item.main-btn {
    color: #2F2F1F;
}

/* Point rouge notification */
.at-nav-dot {
    position: absolute;
    top: 2px;
    right: 30%;
    width: 8px;
    height: 8px;
    background: #e11d48;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .at-desktop-footer { display: none; } /* On cache le footer classique */
    .at-mobile-nav { display: flex; }    /* On montre la barre type App */
    
    /* On ajoute de la marge en bas du body pour que le contenu ne soit pas caché par la barre */
    body { padding-bottom: 80px !important; }
}

.at-auth-container { max-width: 500px; margin: 50px auto; }
.form-info { font-size: 13px; color: #7595A2; margin-bottom: 20px; }
.at-alert { 
    background: #fffbeb; 
    border: 1px solid #fef3c7; 
    color: #92400e; 
    padding: 20px; 
    border-radius: 12px; 
    text-align: center;
}
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; }
.auth-switch a { color: var(--atlas-sky); font-weight: 800; text-decoration: none; }

/* --- RESPONSIVE DASHBOARD --- */

@media (max-width: 992px) {
    /* 1. On change le layout de Flex à Block */
    .atlas-dashboard-wrapper {
        flex-direction: column;
        background: transparent;
        margin: 0;
        border-radius: 0;
    }

    /* 2. On masque la Sidebar car il y a déjà le menu en bas */
    .atlas-db-sidebar {
        display: none !important;
    }

    /* 3. On ajuste la zone principale */
    .atlas-db-main {
        padding: 20px 15px 100px; /* Plus de padding en bas pour ne pas être caché par la barre mobile */
        width: 100%;
    }

    /* 4. On ajuste le Header (Hello + Recherche) */
    .db-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .db-search-bar {
        width: 100%;
    }

    /* 5. On empile les cartes de statistiques (Stats) */
    .db-stats-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    /* 6. On rend les tableaux scrollables horizontalement pour éviter qu'ils sortent de l'écran */
    .db-content-box {
        padding: 20px 15px;
        overflow-x: auto;
        border-radius: 15px;
    }

    .db-table {
        min-width: 500px; /* Force le scroll si l'écran est trop petit */
    }

    /* 7. Ajustement des formulaires (Profil / Edition) */
    .atlas-frontend-form .form-row {
        grid-template-columns: 1fr; /* Formulaires sur une seule colonne */
        gap: 0;
    }

    /* 8. Ajustement du Chat sur mobile */
    .atlas-messenger {
        flex-direction: column;
        height: auto;
    }

    .messenger-contacts {
        width: 100%;
        height: 150px; /* Liste réduite pour laisser de la place au chat */
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .messenger-body {
        height: 450px;
    }
}