/**
 * SBN v1.0 - Styles principaux (Design Moderne)
 * @package SBN
 * @version 1.0.0
 */

/* ============================================================================
   Variables CSS - Palette Moderne
   ========================================================================= */
:root {
    /* Couleurs principales - Gradients modernes */
    --primary-from: #6366f1;
    --primary-to: #8b5cf6;
    --primary-gradient: linear-gradient(135deg, var(--primary-from) 0%, var(--primary-to) 100%);

    --secondary-from: #10b981;
    --secondary-to: #059669;
    --secondary-gradient: linear-gradient(135deg, var(--secondary-from) 0%, var(--secondary-to) 100%);

    --danger-from: #ef4444;
    --danger-to: #dc2626;
    --danger-gradient: linear-gradient(135deg, var(--danger-from) 0%, var(--danger-to) 100%);

    --warning-from: #f59e0b;
    --warning-to: #d97706;
    --warning-gradient: linear-gradient(135deg, var(--warning-from) 0%, var(--warning-to) 100%);

    --info-from: #3b82f6;
    --info-to: #2563eb;
    --info-gradient: linear-gradient(135deg, var(--info-from) 0%, var(--info-to) 100%);

    /* Couleurs neutres modernes */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Couleurs sémantiques */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --border-color: var(--gray-200);

    /* Typographie moderne */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Espacements harmonieux */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border radius moderne */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Ombres élégantes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions fluides */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   Reset & Base Moderne
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
}

a {
    color: var(--primary-from);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-to);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--text-primary);
}

::selection {
    background: var(--primary-from);
    color: white;
}

/* ============================================================================
   Boutons Modernes
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px -4px var(--primary-from);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    box-shadow: 0 8px 20px -4px var(--danger-from);
}

.btn-success {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    box-shadow: 0 8px 20px -4px var(--secondary-from);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--danger-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Alertes
   ========================================================================= */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    font-size: 18px;
    padding: 4px 8px;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================================================
   Navigation
   ========================================================================= */
.navbar {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-brand i {
    margin-right: 8px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
}

.navbar-menu a {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-menu a:hover {
    background-color: var(--light-color);
    text-decoration: none;
}

.navbar-menu i {
    margin-right: 6px;
}

/* ============================================================================
   Dropdown
   ========================================================================= */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-toggle:hover {
    background-color: var(--light-color);
}

/* Commenté pour permettre le contrôle par modern.css et JavaScript
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 200px;
    z-index: 1001;
}
*/

/* Commenté pour permettre le contrôle par JavaScript uniquement
.dropdown:hover .dropdown-menu {
    display: block;
}
*/

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--light-color);
}

.dropdown-menu hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ============================================================================
   Main Content
   ========================================================================= */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: calc(100vh - 200px);
}

/* ============================================================================
   Footer
   ========================================================================= */
.footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 48px;
}

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

.footer-right {
    display: flex;
    gap: 20px;
}

.footer a {
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-right {
        flex-direction: column;
        gap: 8px;
    }
}

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

.text-right {
    text-align: right;
}

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

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

.p-20 {
    padding: 20px;
}
