/* CSS Commun pour toutes les pages - Orgamia */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --primary: #2A3F71;
    --primary-light: #4A5F91;
    --accent: #3498DB;
    --white: #FFFFFF;
    --gray-50: #FAFBFC;
    --gray-100: #F4F6F8;
    --gray-200: #E6E8EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #2D3748;
    --gray-900: #1A202C;
    --success: #059669;
    --info: #2563EB;
    --warning: #D97706;
    --error: #DC2626;
    --shadow-document: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-folder: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-document);
    border-bottom-color: var(--gray-300);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'IBM Plex Serif', serif;
    font-weight: 600;
    font-size: 24px;
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--gray-50);
}

/* MENU HAMBURGER */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}

.mobile-menu-btn span:nth-child(1) {
    top: 14px;
}

.mobile-menu-btn span:nth-child(2) {
    top: 21px;
}

.mobile-menu-btn span:nth-child(3) {
    top: 28px;
}

.mobile-menu-btn.active span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* MENU MOBILE DÉROULANT */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0);
}

.mobile-nav.active {
    max-height: calc(100vh - 80px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-nav-link {
    padding: 20px 32px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-900);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: var(--gray-50);
    color: var(--primary);
}

.mobile-nav-link i {
    color: var(--primary);
    font-size: 14px;
    opacity: 0.6;
}

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

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* ============================================
   CONTAINERS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 32px);
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 32px);
}

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

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

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

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

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

/* ============================================
   GRILLES
   ============================================ */
.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

@media (max-width: 768px) {
    .admin-grid-2,
    .admin-grid-3 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.admin-section {
    padding: clamp(60px, 10vh, 100px) 0;
}

.admin-section-header {
    text-align: center;
    margin-bottom: clamp(40px, 8vh, 60px);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.admin-title {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.2;
}

.admin-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   BOXES / CARTES
   ============================================ */
.admin-box {
    background: white;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-document);
    transition: all 0.3s ease;
}

.admin-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.admin-box-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-box-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.admin-box-title {
    font-family: 'IBM Plex Serif', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.admin-box-content {
    color: var(--gray-600);
    line-height: 1.7;
}

/* ============================================
   CTA / CALL TO ACTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: clamp(60px, 10vh, 80px) 0;
    text-align: center;
    border-radius: 16px;
    margin: 60px 0;
}

.cta-section h2 {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: clamp(16px, 2vw, 18px);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* ============================================
   UTILITAIRES
   ============================================ */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-40 {
    margin-top: 40px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .admin-box {
        padding: 24px;
    }
    
    .admin-section {
        padding: 40px 0;
    }
}
