/* ColiXpress Developer Portal — Charte & Styles */

:root {
    /* Couleurs de marque ColiXpress */
    --yellow: #FDCE00;
    --yellow-hover: #E6BA00;
    --yellow-light: #FFFBE0;
    --yellow-glow: rgba(253, 206, 0, 0.15);
    --dark: #1A1A1A;
    --text: #333333;
    --text-light: #6C757D;
    --bg: #FFFFFF;
    --bg-alt: #F8F9FA;
    --bg-dark: #111111;
    --border: #E9ECEF;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --success: #28a745;
    --danger: #dc3545;
    --info: #0d6efd;
    --warning: #ffc107;
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 600px) {
    .container { padding: 0 20px; }
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-dark {
    background: var(--bg-dark);
    color: #fff;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.section-header .badge {
    display: inline-block;
    background: var(--yellow-glow);
    color: var(--yellow-hover);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-dark .section-header h2 { color: #fff; }
.section-dark .section-header p { color: #adb5bd; }

/* Header / Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo style identique à colixpress.com */
.logo {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-tagline {
    font-size: 0.62rem;
    color: var(--text-light);
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1;
}

.logo-tagline span {
    color: var(--yellow-hover);
    font-weight: 600;
}

.logo-tagline .dev-tag {
    color: var(--text-light);
    font-weight: 500;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--yellow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--dark);
}

.sidebar-logo {
    align-items: flex-start;
}

.sidebar-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.sidebar-logo .logo-tagline {
    color: #adb5bd;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    position: relative;
}

.nav-links a:hover { color: var(--yellow-hover); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--yellow);
    transition: width var(--transition);
}

.nav-links a:hover::after { width: 100%; }

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
    line-height: 1;
}

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

.btn-primary:hover {
    background: var(--yellow-hover);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--dark);
    color: var(--bg);
}

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

.btn-white:hover {
    background: var(--yellow-light);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--dark);
    color: #fff;
}

.btn-dark:hover {
    background: #000;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-block { width: 100%; }

/* Hero */
.hero {
    padding: 120px 0 160px;
    background-image: url('/assets/images/hero-section-developper-colixpress.png');
    background-size: cover;
    background-position: center 15%;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    margin-bottom: 24px;
    color: #fff;
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 32px;
    color: rgba(255,255,255,0.85);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.code-block {
    background: var(--bg-dark);
    color: #d4d4d4;
    border-radius: var(--radius);
    padding: 20px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block .keyword { color: var(--yellow); }
.code-block .string { color: #7ee787; }
.code-block .comment { color: #6C757D; }

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--yellow-glow);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--yellow-hover);
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.card h3 {
    margin-bottom: 12px;
}

/* Steps */
.step-card {
    position: relative;
    padding-top: 20px;
}

.step-number {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    background: var(--dark);
    color: var(--yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-card h3 {
    margin-top: 0;
    margin-left: 44px;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.step-card p {
    margin-top: 8px;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

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

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

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px var(--yellow-glow);
}

.form-control::placeholder {
    color: #adb5bd;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}

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

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--yellow-light) 100%);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
}

.auth-card .logo {
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--yellow-hover);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

.alert.show { display: block; }

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #155724;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.alert-info {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #084298;
}

/* Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 0;
}

.sidebar-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #fff;
}

.sidebar-logo .logo-icon {
    background: var(--yellow);
    color: var(--dark);
}

.sidebar-menu {
    padding: 0 16px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: #adb5bd;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-menu a.active {
    border-left: 3px solid var(--yellow);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px;
    background: var(--bg-alt);
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.stat-card h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.table-container {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.table th {
    font-weight: 600;
    color: var(--dark);
    background: var(--bg-alt);
}

.table td {
    color: var(--text);
}

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

.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.badge-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.badge-test {
    background: rgba(253, 206, 0, 0.15);
    color: #856404;
}

/* Documentation */
.docs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.docs-nav h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.docs-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.docs-nav a:hover,
.docs-nav a.active {
    background: var(--yellow-glow);
    color: var(--yellow-hover);
}

.docs-content h2 {
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.docs-content h2:first-of-type { margin-top: 0; }

.docs-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.docs-content p {
    margin-bottom: 16px;
}

.docs-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 16px;
}

.docs-content li {
    margin-bottom: 8px;
    color: var(--text-light);
}

.docs-content pre {
    background: var(--bg-dark);
    color: #d4d4d4;
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
}

.docs-content code {
    background: var(--bg-alt);
    color: var(--dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.method-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 10px;
}

.method-get { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.method-post { background: rgba(40, 167, 69, 0.1); color: #198754; }
.method-put { background: rgba(255, 193, 7, 0.1); color: #856404; }
.method-delete { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

.endpoint {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.endpoint h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.endpoint code {
    background: var(--bg-alt);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: #adb5bd;
    padding: 40px 0;
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer a {
    color: #fff;
    margin-left: 20px;
}

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

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none !important; }

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.1);
    border-left-color: var(--dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    background-color: #FFFFFF;
    padding: 32px 20px;
    flex-direction: column;
    gap: 24px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.mobile-menu.active { display: flex; }

.mobile-menu a {
    font-size: 1.15rem;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-menu .btn { width: 100%; margin-top: 12px; }

@media (max-width: 900px) {
    .nav-links, .nav-cta { display: none; }
    .hamburger { display: flex; }
    .hero-inner { flex-direction: column; }
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { position: static; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .dashboard { flex-direction: column; }
}
