/**
 * Theme Tourisme & IA - Style inspiré viticole
 * Palette: Bleu profond, Doré/Bronze, Beige crème
 */

:root {
    /* Couleurs principales */
    --primary-dark: #0f172a;      /* Bleu nuit profond */
    --primary: #1e3a5f;           /* Bleu profond */
    --primary-light: #2d4a6f;     /* Bleu moyen */

    /* Accents dorés */
    --accent-gold: #b8860b;       /* Or foncé */
    --accent-bronze: #cd9b4a;     /* Bronze */
    --accent-gold-light: #d4a574; /* Or clair */
    --gradient-gold: linear-gradient(135deg, #b8860b 0%, #d4a574 50%, #cd9b4a 100%);

    /* Neutres chauds */
    --bg-cream: #faf8f5;          /* Fond crème */
    --bg-warm: #f5f0e8;           /* Fond chaud */
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;

    /* Dimensions */
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 12px;

    /* Ombres */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========================================
   PAGE CONNEXION - Style immersif
   ======================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Fond avec image et overlay */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 58, 95, 0.5) 100%),
        url('/images/bg-tourisme.jpg') center/cover no-repeat;
}

/* Élément décoratif (style tonneau mais version voyage) */
.auth-decoration {
    position: fixed;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 80%;
    background:
        linear-gradient(135deg, rgba(184, 134, 11, 0.1) 0%, transparent 100%),
        url('/images/decoration-ia.png') center/contain no-repeat;
    z-index: 0;
    opacity: 0.9;
}

/* Carte de connexion */
.auth-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.auth-card-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.auth-logo svg,
.auth-logo img {
    width: 50px;
    height: 50px;
}

.auth-logo i {
    font-size: 2.5rem;
    color: var(--accent-gold);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.auth-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-card-body {
    padding: 1.5rem 2rem 2rem;
}

/* Champs de formulaire style image */
.form-group-styled {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group-styled .form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
}

.form-group-styled input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s ease;
}

.form-group-styled input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
}

.form-group-styled input::placeholder {
    color: #9ca3af;
}

/* Bouton style doré */
.btn-gold {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-gold);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

.btn-gold:active {
    transform: translateY(0);
}

/* Lien mot de passe oublié */
.auth-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--accent-gold);
}

/* Footer de la carte */
.auth-card-footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-card-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-card-footer a:hover {
    color: var(--accent-gold);
}

/* ========================================
   DASHBOARD - SIDEBAR STYLE VITICOLE
   ======================================== */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar-tourisme {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-dark);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.sidebar-brand {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-brand small {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1.5rem 1.5rem 0.5rem;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link-styled {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link-styled i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.nav-link-styled:hover {
    background: var(--primary-light);
    color: white;
}

.nav-link-styled.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-link-styled.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-gold);
    border-radius: 0 2px 2px 0;
}

/* User profile en bas de sidebar */
.sidebar-user {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content-tourisme {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--bg-cream);
}

/* Navbar top */
.navbar-tourisme {
    height: var(--navbar-height);
    background: white;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.navbar-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.navbar-greeting span {
    color: var(--accent-gold);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-weather {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-warm);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--text-dark);
}

.navbar-weather i {
    color: var(--accent-gold);
}

.navbar-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.navbar-icon-btn:hover {
    background: var(--accent-gold);
    color: white;
}

/* Content area */
.content-area {
    padding: 2rem;
}

/* Cards style image */
.card-tourisme {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-tourisme:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-tourisme-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-tourisme-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-tourisme-body {
    padding: 1.5rem;
}

/* ========================================
   CHAT INTERFACE (style image 3)
   ======================================== */

.chat-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height) - 4rem);
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
}

.chat-agent-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.chat-agent-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    line-height: 1.5;
}

.message-user {
    align-self: flex-end;
    background: var(--bg-warm);
    color: var(--text-dark);
    border-bottom-right-radius: 4px;
}

.message-agent {
    align-self: flex-start;
    background: var(--primary-dark);
    color: white;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 1rem 2rem;
    background: var(--gradient-gold);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

/* ========================================
   AGENTS GRID (style avatars image 2)
   ======================================== */

.agents-showcase {
    text-align: center;
    padding: 2rem;
}

.agents-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.agents-title span {
    color: var(--accent-gold);
}

.agents-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.agents-avatars {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.agent-avatar-item {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.agent-avatar-item:hover {
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

.agent-avatar-item.active {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.agent-avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .auth-decoration {
        opacity: 0.3;
        width: 60%;
    }
}

@media (max-width: 768px) {
    .sidebar-tourisme {
        transform: translateX(-100%);
    }

    .sidebar-tourisme.active {
        transform: translateX(0);
    }

    .main-content-tourisme {
        margin-left: 0;
    }

    .auth-decoration {
        display: none;
    }

    .navbar-weather {
        display: none;
    }
}

/* Menu toggle mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-gold {
    color: var(--accent-gold);
}

.bg-gold {
    background: var(--gradient-gold);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.rounded-styled {
    border-radius: var(--border-radius);
}
