/* =====================================================
   Power BI Cours — NordSupply
   Couleurs Girault Conceptions : noir, blanc, or Power BI
   ===================================================== */

:root {
    --gc-black: #0A0A0A;
    --gc-dark: #1A1A1A;
    --gc-gray-900: #111827;
    --gc-gray-800: #1F2937;
    --gc-gray-700: #374151;
    --gc-gray-500: #6B7280;
    --gc-gray-300: #D1D5DB;
    --gc-gray-200: #E5E7EB;
    --gc-gray-100: #F3F4F6;
    --gc-white: #FFFFFF;
    --pbi-yellow: #F2C811;
    --pbi-yellow-dark: #D4AF0C;
    --gc-accent: #F2C811;
    --gc-accent-dark: #B88A00;
    --gc-success: #10B981;
    --gc-warning: #F59E0B;
    --gc-danger: #EF4444;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.15), 0 8px 10px -6px rgba(0,0,0,.1);
    --shadow-glow: 0 0 40px rgba(242,200,17,.35);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gc-white);
    color: var(--gc-gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================ HEADER ================ */
.header {
    background: var(--gc-black);
    color: var(--gc-white);
    padding: 24px 0;
    border-bottom: 3px solid var(--pbi-yellow);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: var(--gc-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

.brand-text h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--gc-white);
}

.brand-text p {
    font-size: 12px;
    color: var(--pbi-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.header-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.header-nav a {
    color: var(--gc-white);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all .2s;
}

.header-nav a:hover {
    background: rgba(242,200,17,.15);
    color: var(--pbi-yellow);
}

/* ================ HERO ================ */
.hero {
    background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 50%, #0A0A0A 100%);
    color: var(--gc-white);
    padding: 80px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(242,200,17,.08) 0%, transparent 60%);
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }

.hero-label {
    display: inline-block;
    background: rgba(242,200,17,.15);
    color: var(--pbi-yellow);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(242,200,17,.35);
    margin-bottom: 24px;
}

.pbi-logo-container {
    display: flex;
    justify-content: center;
    margin: 30px 0 24px;
}

.pbi-logo {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, var(--pbi-yellow) 0%, var(--pbi-yellow-dark) 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pbi-logo svg { width: 90px; height: 90px; }

.pbi-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--pbi-yellow);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 28px;
    border: 2px solid var(--pbi-yellow);
    border-radius: 50px;
    margin-top: 12px;
    transition: all .3s;
}

.pbi-link:hover {
    background: var(--pbi-yellow);
    color: var(--gc-black);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(242,200,17,.4);
}

.hero h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 24px 0 16px;
    letter-spacing: -.5px;
    line-height: 1.2;
}

.hero p.subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--gc-gray-300);
    max-width: 700px;
    margin: 0 auto 8px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-block {
    text-align: center;
}

.stat-block .num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--pbi-yellow);
    line-height: 1;
}

.stat-block .lbl {
    display: block;
    font-size: 11px;
    color: var(--gc-gray-300);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

/* ================ SOURCES GRID ================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h3 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: var(--gc-black);
    margin-bottom: 10px;
}

.section-header h3 span {
    background: linear-gradient(135deg, var(--pbi-yellow) 0%, var(--pbi-yellow-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p { color: var(--gc-gray-500); font-size: 16px; }

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.source-card {
    background: var(--gc-white);
    border: 2px solid var(--gc-gray-200);
    border-radius: 16px;
    overflow: hidden;
    transition: all .3s;
    display: flex;
    flex-direction: column;
}

.source-card:hover {
    border-color: var(--pbi-yellow);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.source-card-header {
    padding: 20px 24px;
    background: var(--gc-black);
    color: var(--gc-white);
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 2px solid var(--pbi-yellow);
}

.source-icon {
    width: 50px;
    height: 50px;
    background: var(--pbi-yellow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.source-card-header h4 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.source-type {
    display: inline-block;
    font-size: 10px;
    color: var(--pbi-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
    font-weight: 600;
}

.source-card-body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.source-desc {
    font-size: 14px;
    color: var(--gc-gray-700);
    line-height: 1.55;
}

.source-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gc-black);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.source-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--pbi-yellow);
    border-radius: 2px;
}

.credentials-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.credentials-table tr { border-bottom: 1px solid var(--gc-gray-100); }
.credentials-table tr:last-child { border-bottom: none; }

.credentials-table td {
    padding: 7px 0;
    vertical-align: top;
}

.credentials-table .lbl-col {
    color: var(--gc-gray-500);
    font-weight: 500;
    padding-right: 12px;
    width: 40%;
    white-space: nowrap;
}

.credentials-table .val-col {
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
    color: var(--gc-black);
    font-weight: 600;
    word-break: break-all;
}

.credentials-table .val-col.secret {
    background: linear-gradient(90deg, rgba(242,200,17,.2) 0%, rgba(242,200,17,.05) 100%);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid var(--pbi-yellow);
    display: inline-block;
}

.tables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tables-list span {
    background: var(--gc-gray-100);
    color: var(--gc-gray-800);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    border: 1px solid var(--gc-gray-200);
}

.instructions {
    background: var(--gc-gray-100);
    border-left: 3px solid var(--pbi-yellow);
    padding: 12px 14px;
    font-size: 12px;
    color: var(--gc-gray-700);
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}

.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gc-gray-500);
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    transition: all .2s;
    margin-left: 4px;
    vertical-align: middle;
}

.copy-btn:hover { color: var(--pbi-yellow-dark); background: rgba(242,200,17,.1); }
.copy-btn.copied { color: var(--gc-success); }

/* ================ BADGE WRITABLE ================ */
.badge-writable {
    background: var(--gc-success);
    color: var(--gc-white);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 700;
    margin-left: 8px;
}

/* ================ FILE LIST PAGE ================ */
.filelist-page { padding: 40px 24px; max-width: 1200px; margin: 0 auto; }

.filelist-page h2 {
    font-size: 28px;
    color: var(--gc-black);
    margin-bottom: 8px;
}

.filelist-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--gc-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.filelist-table th {
    background: var(--gc-black);
    color: var(--gc-white);
    text-align: left;
    padding: 14px 18px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 2px solid var(--pbi-yellow);
}

.filelist-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--gc-gray-100);
    font-size: 14px;
}

.filelist-table tr:hover { background: var(--gc-gray-100); }

.filelist-table a {
    color: var(--gc-black);
    text-decoration: none;
    font-weight: 500;
}

.filelist-table a:hover { color: var(--pbi-yellow-dark); }

.file-icon { margin-right: 8px; }

.upload-form {
    background: var(--gc-gray-100);
    border: 2px dashed var(--gc-gray-300);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.upload-form h3 {
    font-size: 16px;
    color: var(--gc-black);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.upload-form input[type="text"],
.upload-form input[type="file"] {
    padding: 10px 14px;
    border: 1px solid var(--gc-gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: var(--gc-white);
    flex: 1;
    min-width: 150px;
}

.upload-form button {
    background: var(--gc-black);
    color: var(--pbi-yellow);
    border: 2px solid var(--pbi-yellow);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-form button:hover {
    background: var(--pbi-yellow);
    color: var(--gc-black);
}

.alert-ok {
    background: #D1FAE5;
    color: #065F46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid var(--gc-success);
    font-size: 14px;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid var(--gc-danger);
    font-size: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gc-gray-700);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}

.back-link:hover { color: var(--gc-black); }

/* ================ FOOTER ================ */
.footer {
    background: var(--gc-black);
    color: var(--gc-gray-300);
    padding: 40px 24px;
    text-align: center;
    border-top: 3px solid var(--pbi-yellow);
    margin-top: 60px;
}

.footer p { font-size: 13px; margin: 4px 0; }
.footer a { color: var(--pbi-yellow); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ================ RESPONSIVE ================ */
@media (max-width: 768px) {
    .hero { padding: 50px 20px 60px; }
    .pbi-logo { width: 100px; height: 100px; }
    .pbi-logo svg { width: 65px; height: 65px; }
    .hero-stats { gap: 24px; }
    .stat-block .num { font-size: 28px; }
    .sources-grid { grid-template-columns: 1fr; gap: 16px; }
    .container { padding: 40px 16px; }
    .brand-text h1 { font-size: 14px; }
    .brand-text p { font-size: 10px; }
    .upload-form-row { flex-direction: column; align-items: stretch; }
    .upload-form button { width: 100%; }
    .filelist-table { font-size: 12px; }
    .filelist-table th, .filelist-table td { padding: 10px 12px; }
}
