/**
 * Template Expert FOAD - Styles
 * ACE EDUCATION
 */

/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #e94560;
    --success-color: #27ae60;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-muted: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* =====================================================
   HEADER / NAVIGATION
   ===================================================== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.logo span {
    color: var(--accent-color);
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: background 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.nav a.active {
    background: var(--accent-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
}

.user-info .avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 150px);
}

.page-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-header.accent {
    background: var(--accent-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group label .required {
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* =====================================================
   BOUTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #d63850;
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--text-color);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-success { background: #d5f5e3; color: #1e8449; }
.badge-warning { background: #fef9e7; color: #9a7d0a; }
.badge-danger { background: #fadbd8; color: #922b21; }
.badge-info { background: #d6eaf8; color: #1a5276; }
.badge-primary { background: #d4e6f1; color: #1a5276; }

/* =====================================================
   ALERTES
   ===================================================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d5f5e3;
    border-color: var(--success-color);
    color: #1e8449;
}

.alert-warning {
    background: #fef9e7;
    border-color: var(--warning-color);
    color: #9a7d0a;
}

.alert-danger {
    background: #fadbd8;
    border-color: var(--danger-color);
    color: #922b21;
}

.alert-info {
    background: #d6eaf8;
    border-color: var(--info-color);
    color: #1a5276;
}

/* =====================================================
   TABLEAUX
   ===================================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.table tr:hover {
    background: var(--light-bg);
}

.table tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff6b8a);
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* =====================================================
   STATS CARDS
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--accent-color);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* =====================================================
   TABS / NAVIGATION PAR ONGLETS
   ===================================================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 15px 25px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =====================================================
   SECTION NOTION (Formulaire expert)
   ===================================================== */
.notion-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.notion-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.notion-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notion-header .notion-number {
    background: var(--accent-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notion-content {
    padding: 25px;
    display: none;
}

.notion-content.active {
    display: block;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.notion-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.login-box .logo span {
    color: var(--accent-color);
}

/* =====================================================
   DASHBOARD GRID
   ===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.contribution-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contribution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contribution-card .card-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
}

.contribution-card .card-top h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contribution-card .card-top .meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

.contribution-card .card-middle {
    padding: 20px;
}

.contribution-card .card-bottom {
    padding: 15px 20px;
    background: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent-color);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* =====================================================
   UTILITAIRES
   ===================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
