/* ===== DEVELOPERS PORTAL - UGO Light Theme ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --light-bg: #f5f5f5;
    --light-card: #ffffff;
    --light-text: #1a1a1a;
    --light-text-muted: #6b7280;
    --orange-primary: #ff6b35;
    --orange-secondary: #f7931e;
    --orange-gradient: linear-gradient(135deg, #ff6b35, #f7931e);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --border-light: 1px solid rgba(255, 107, 53, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--light-text);
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ===== LAYOUT ===== */

.developers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== NAV (light) ===== */

.developers-nav {
    background: var(--light-card);
    border-bottom: var(--border-light);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.developers-nav .brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--light-text);
    margin-right: auto;
}

.developers-nav a {
    color: var(--light-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.developers-nav a:hover {
    color: var(--orange-primary);
}

.developers-nav a.active {
    color: var(--orange-primary);
}

/* ===== PAGE AUTH (login/register) ===== */

.page-auth {
    min-height: 100vh;
    width: 100%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--light-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: var(--border-light);
    padding: 48px 32px 32px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.auth-logo-img {
    max-width: 200px;
    width: auto;
    height: auto;
}
.auth-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--light-text);
    text-align: center;
    margin: 0 0 24px 0;
}

.auth-messages {
    margin-bottom: 20px;
}

.auth-form {
    margin-bottom: 20px;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--light-card);
    border: 1px solid var(--orange-primary);
    border-radius: var(--radius-sm);
    color: var(--light-text);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.auth-input::placeholder {
    color: var(--light-text-muted);
}

.auth-input:focus {
    outline: none;
    border-color: var(--orange-secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--orange-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-login:hover {
    opacity: 0.95;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.auth-register-section {
    margin-top: 20px;
    text-align: center;
}

.auth-register-text {
    margin: 0;
    color: var(--light-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-register-link {
    color: var(--orange-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.auth-register-link:hover {
    color: var(--orange-secondary);
}

/* ===== CARDS ===== */

.card {
    background: var(--light-card);
    border: var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
}

.card h1,
.card h2,
.card h3 {
    color: var(--light-text);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card h1 { font-size: 1.5rem; }
.card h2 { font-size: 1.25rem; }
.card h3 { font-size: 1.1rem; }

.card p {
    color: var(--light-text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.card-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    margin-bottom: 1rem;
}

.card-body {
    color: var(--light-text);
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--orange-gradient);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: var(--light-card);
    color: var(--light-text);
    border: 1px solid var(--orange-primary);
}

.btn-secondary:hover {
    border-color: var(--orange-secondary);
    color: var(--orange-primary);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.card-highlight {
    border-width: 2px;
    border-color: var(--orange-primary);
}

/* ===== FORM ===== */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 14px;
    color: var(--light-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--orange-primary);
    border-radius: var(--radius-sm);
}

.form-control.form-control-monospace,
input.form-control-monospace {
    font-family: ui-monospace, monospace;
    font-size: 14px;
    color: var(--light-text);
    background: var(--light-card);
}

.form-group input:focus {
    outline: none;
    border-color: var(--orange-secondary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.15);
}

/* ===== ALERTS ===== */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* ===== TABLE ===== */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--light-text);
}

th {
    font-weight: 600;
    color: var(--light-text);
}

/* ===== CODE ===== */

code {
    background: rgba(255, 107, 53, 0.1);
    color: var(--orange-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, monospace;
}

pre {
    background: #1a1a1a;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* ===== DASHBOARD TITLE (logo + h1) ===== */

.dashboard-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.dashboard-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.dashboard-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-right: 0.5rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--light-text);
    margin: 0;
}

/* ===== BADGE GRID (dashboard cards) ===== */

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.badge-item {
    background: var(--light-card);
    border: var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s ease;
}

.badge-item:hover {
    border-color: var(--orange-secondary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.badge-item .btn {
    align-self: flex-start;
}

/* ===== PORTAL/DOCS LAYOUT (3 colonne) ===== */

.portal-shell,
.docs-shell {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 56px);
    margin-top: 1.5rem;
}

.portal-sidebar,
.docs-sidebar {
    width: 260px;
    background: var(--light-card);
    border-radius: var(--radius);
    border: var(--border-light);
    box-shadow: var(--shadow-light);
    padding: 1.25rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.docs-sidebar-header {
    padding: 0 0.5rem 0.25rem;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.docs-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--orange-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.4);
}

.docs-logo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light-text);
}

.docs-logo-subtitle {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--light-text-muted);
}

.docs-sidebar-search {
    position: relative;
    padding: 0 0.5rem;
}

.docs-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--light-text-muted);
}

.docs-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.85rem;
    background: #f3f4f6;
    color: var(--light-text);
}

.docs-search-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.25);
}

.docs-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0.25rem 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.docs-nav-item {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.docs-nav-item:hover {
    background: #f3f4f6;
}

.docs-nav-item.is-active {
    background: rgba(255, 107, 53, 0.06);
    color: var(--orange-primary);
    border-left: 3px solid var(--orange-primary);
}

.docs-nav-label {
    flex: 1;
}

.docs-sidebar-footer {
    padding: 0.5rem 0.5rem 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.6);
    margin-top: 0.5rem;
}

.docs-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--light-text-muted);
    margin-bottom: 0.25rem;
}

.docs-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.docs-status-version {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--light-text-muted);
}

.portal-main,
.docs-main {
    flex: 1;
    margin-left: 1.5rem;
}

.portal-mobile-header,
.docs-mobile-header {
    display: none;
}

.portal-content,
.docs-content {
    padding: 0.25rem;
}

.docs-section {
    display: none;
    margin-bottom: 2.5rem;
}

.docs-section.is-active {
    display: block;
}

.docs-section-hero {
    margin-bottom: 1.5rem;
}

.docs-hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    color: var(--light-text);
}

.docs-hero-subtitle {
    font-size: 1rem;
    color: var(--light-text-muted);
    max-width: 38rem;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.docs-card-highlight {
    background: var(--light-card);
    border-radius: var(--radius);
    border: var(--border-light);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.docs-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.docs-card-icon-code {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.docs-card-icon-arch {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.docs-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.docs-card-text {
    font-size: 0.9rem;
    color: var(--light-text-muted);
}

.docs-code-inline {
    display: inline-block;
    font-size: 0.85rem;
}

.docs-card {
    background: var(--light-card);
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-card);
    padding: 1.25rem 1.25rem 1rem;
}

.docs-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    margin-bottom: 0.75rem;
}

.docs-card-header-icon {
    font-size: 0.9rem;
}

.docs-card-header-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--light-text-muted);
}

.docs-table-wrapper {
    overflow-x: auto;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.docs-table th,
.docs-table td {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.docs-table th {
    text-align: left;
    font-weight: 600;
    color: var(--light-text-muted);
}

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

.docs-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.docs-section-text {
    font-size: 0.95rem;
    color: var(--light-text-muted);
    margin-bottom: 1.25rem;
}

.docs-code-card {
    background: #020617;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.7);
    margin-bottom: 1rem;
}

.docs-code-header {
    padding: 0.5rem 0.9rem;
    background: #0b1120;
    border-bottom: 1px solid rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-code-label {
    font-size: 0.7rem;
    color: #64748b;
    font-family: ui-monospace, monospace;
}

.docs-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: 0.88rem;
}

.docs-callout-warning {
    background: #fffbeb;
    border-color: #f97316;
    color: #92400e;
}

.docs-callout-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #fed7aa;
    color: #7c2d12;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.docs-callout-title {
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.docs-callout-text {
    margin: 0;
}

.docs-section-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.docs-endpoint {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    align-items: flex-start;
}

.docs-endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.docs-endpoint-path {
    font-size: 0.85rem;
}

.docs-endpoint-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.docs-endpoint-scope {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--light-text-muted);
    margin-bottom: 0.75rem;
}

.docs-endpoint-scope-pill {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-family: ui-monospace, monospace;
    color: #4f46e5;
}

.docs-endpoint-params-block {
    margin-top: 0.5rem;
}

.docs-endpoint-params-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--light-text-muted);
    margin-bottom: 0.4rem;
}

.docs-endpoint-params-grid {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    overflow: hidden;
}

.docs-endpoint-param-row {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.docs-endpoint-param-row:last-child {
    border-bottom: none;
}

.docs-endpoint-param-key {
    font-family: ui-monospace, monospace;
    color: #4f46e5;
    font-weight: 600;
}

.docs-endpoint-param-type {
    color: var(--light-text-muted);
    font-style: italic;
}

.docs-endpoint-notes {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-left: 3px solid #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.docs-endpoint-examples .docs-code-card pre {
    margin: 0;
}

.method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    text-transform: uppercase;
}

.method-badge-get {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.method-badge-post {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.method-badge-patch {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

.method-badge-delete {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.docs-code-header-bar {
    background: #020617;
}

.docs-code-dots {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.docs-code-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.docs-code-dots .dot-red {
    background: #ef4444;
}

.docs-code-dots .dot-amber {
    background: #f59e0b;
}

.docs-code-dots .dot-green {
    background: #22c55e;
}

.docs-code-header-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #64748b;
    font-family: ui-monospace, monospace;
}

/* ===== ICONS (SVG) ===== */

.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    fill: currentColor;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-accent {
    color: var(--orange-primary);
}

.icon-muted {
    color: var(--light-text-muted);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 640px) {
    .developers-container {
        padding: 1rem;
    }
    .auth-card {
        padding: 32px 24px 24px;
    }
    .auth-logo-img {
        max-width: 160px;
    }
    .badge-grid {
        grid-template-columns: 1fr;
    }
    .portal-shell,
    .docs-shell {
        flex-direction: column;
    }
    .portal-sidebar,
    .docs-sidebar {
        position: fixed;
        inset: 0;
        max-width: 260px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 40;
        border-radius: 0;
    }
    .docs-sidebar.is-open {
        transform: translateX(0);
    }
    .portal-main,
    .docs-main {
        margin-left: 0;
        margin-top: 0.75rem;
    }
    .portal-mobile-header,
    .docs-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.6rem 0.25rem 0.6rem 0.25rem;
        margin-bottom: 0.75rem;
    }
    .docs-mobile-menu-btn {
        border: none;
        background: var(--light-card);
        border-radius: 999px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-light);
        font-size: 1.1rem;
        cursor: pointer;
    }
    .docs-mobile-title {
        font-size: 0.95rem;
        font-weight: 600;
    }
    .docs-mobile-spacer {
        width: 36px;
        height: 36px;
    }
    .docs-endpoint {
        grid-template-columns: 1fr;
    }
}
