/**
 * Styles pour le projet VoiceAI - Couleurs Clemento
 */

/* Variables CSS - Couleurs Clemento */
:root {
    /* Couleurs Clemento */
    --color-primary: #FF6D00;
    --color-secondary: #FF8A33;
    --color-tertiary: #E65100;
    --color-dark: #FF6D00;
    --color-light: #ffffff;
    --color-neutral: #CC8A59;
    --color-accent-warm: #FF8A33;
    --color-accent-fresh: #FFA64D;
    --text-dark: #1A1A1A;
    --text-medium: #444444;
    --text-light: #FFFFFF;
    
    /* Couleurs dérivées pour l'UI */
    --bg-light: #FFF5F0;
    --bg-card: #FFFFFF;
    --border-light: #FFE0CC;
    --shadow-color: rgba(255, 109, 0, 0.15);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Login Box */
.login-box {
    max-width: 450px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-box h1 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--color-tertiary);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.dashboard h1 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Card */
.card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.user-info p {
    margin: 10px 0;
    color: #666;
}

/* Text utilities */
.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: var(--color-primary);
    text-decoration: none;
}

.text-center a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
    color: white;
}

/* ==================== PORTAIL ==================== */

/* Body du portail */
.portal-body {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar du portail */
.navbar-portal {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand a {
    text-decoration: none;
    color: inherit;
}

.navbar-brand .logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.navbar-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f8f9fa;
    color: var(--color-primary);
}

.nav-item.active {
    background: #fff5f0;
    color: var(--color-primary);
}

.nav-icon {
    font-size: 18px;
}

/* Dropdown de navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

.nav-dropdown-toggle .dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.nav-dropdown-toggle:hover .dropdown-arrow {
    transform: translateY(2px);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-dropdown-menu .dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.nav-dropdown-menu .dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.nav-dropdown-menu .dropdown-item:hover {
    background: #f8f9fa;
}

.nav-dropdown-menu .dropdown-item.active {
    background: #fff5f0;
    color: var(--color-primary);
}

.nav-dropdown-menu .dropdown-item span {
    font-size: 16px;
}

/* Menu utilisateur */
.navbar-user {
    position: relative;
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-button:hover {
    border-color: var(--color-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
}

.user-button:hover .dropdown-arrow {
    transform: translateY(2px);
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-header strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.dropdown-header small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: var(--color-primary);
    color: white;
}

.badge-user {
    background: #e2e8f0;
    color: #64748b;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Toggle mobile */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #64748b;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Contenu principal */
.portal-main {
    flex: 1;
    padding: 32px 24px;
}

.portal-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section de bienvenue */
.welcome-section {
    margin-bottom: 32px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #64748b;
}

/* Grille de cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card-dashboard {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-dashboard:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 109, 0, 0.08);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.card-info {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.card-detail {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
    transition: gap 0.2s;
}

.card-link:hover {
    gap: 12px;
}

.card-link.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

/* Section d'aide */
.help-section {
    margin-top: 32px;
}

.help-card {
    background: #f8f9fa;
    border: 2px solid var(--color-primary);
    color: var(--text-dark);
    padding: 24px;
    border-radius: 16px;
}

.help-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.help-card p {
    font-size: 14px;
    color: var(--text-medium);
}

/* Page header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: #64748b;
}

/* Réglages */
.settings-grid {
    display: grid;
    gap: 24px;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e2e8f0;
}

.settings-card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.settings-card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.settings-card-header p {
    font-size: 14px;
    color: #64748b;
}

/* Liste d'infos */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #64748b;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

/* Footer du portail */
.portal-footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 24px;
    text-align: center;
    margin-top: auto;
}

.portal-footer p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    /* Portail responsive */
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .navbar-menu.show {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
        padding: 16px 24px;
        border-radius: 0;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f8f9fa;
        display: none;
    }
    
    .nav-dropdown-menu.show {
        display: block;
    }
    
    .nav-dropdown-menu .dropdown-item {
        padding-left: 48px;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .portal-main {
        padding: 24px 16px;
    }
    
    .user-name {
        display: none;
    }
}

/* Tables d'appels sortants */
.calls-table-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calls-table {
    width: 100%;
    border-collapse: collapse;
}

.calls-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.calls-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.calls-table td {
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.calls-table tbody tr:hover {
    background: #f9fafb;
}

.action-buttons-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons-inline form {
    margin: 0;
}

