/* ============================================================
   Clean QA Academy — Hub des 7 Providers IA
   Page : IA/index.html
   Auteur : Julien Mer
   ============================================================ */

/* -----------------------------------------------------------
   1. Variables — palette neutre par défaut (dark cinematique)
   ----------------------------------------------------------- */
:root {
    --hub-bg: #0e0c0a;
    --hub-bg-soft: #1a1612;
    --hub-bg-card: #1f1a14;
    --hub-text: #faf9f5;
    --hub-text-soft: #c9c0a4;
    --hub-text-muted: #7a7368;
    --hub-border: #2a241c;
    --hub-accent: #d4884a;
    --hub-glow: rgba(212, 136, 74, 0.45);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;

    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 18px;

    --transition-bg: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease;
}

/* Mode light global (toggle dans le header) */
:root[data-theme="light"] {
    --hub-bg: #faf9f5;
    --hub-bg-soft: #f0ebd8;
    --hub-bg-card: #ffffff;
    --hub-text: #1a1814;
    --hub-text-soft: #4a463e;
    --hub-text-muted: #7a7368;
    --hub-border: #e5dfc9;
    --hub-accent: #b87333;
    --hub-glow: rgba(184, 115, 51, 0.4);
}

/* -----------------------------------------------------------
   2. Showcase au hover — le fond global adopte la charte du provider survolé
   ----------------------------------------------------------- */
body[data-showcase="claude"] {
    --hub-bg: #faf9f5;
    --hub-bg-soft: #f0ebd8;
    --hub-bg-card: #f5f2e6;
    --hub-text: #1a1814;
    --hub-text-soft: #4a463e;
    --hub-text-muted: #7a7368;
    --hub-border: #e5dfc9;
    --hub-accent: #b87333;
    --hub-glow: rgba(184, 115, 51, 0.4);
}

body[data-showcase="cerebras"] {
    --hub-bg: #fafafa;
    --hub-bg-soft: #f0f0f0;
    --hub-bg-card: #ffffff;
    --hub-text: #0a0a0a;
    --hub-text-soft: #4a4a4a;
    --hub-text-muted: #8a8a8a;
    --hub-border: #d4d4d4;
    --hub-accent: #ff4520;
    --hub-glow: rgba(255, 69, 32, 0.4);
}

body[data-showcase="mistral"] {
    --hub-bg: #0a0a0a;
    --hub-bg-soft: #1a0e08;
    --hub-bg-card: #1f1408;
    --hub-text: #fff5e6;
    --hub-text-soft: #ffb84a;
    --hub-text-muted: #c97c3a;
    --hub-border: #4a1a08;
    --hub-accent: #ff5722;
    --hub-glow: rgba(255, 87, 34, 0.5);
}

body[data-showcase="groq"] {
    --hub-bg: #ffffff;
    --hub-bg-soft: #fff5e6;
    --hub-bg-card: #fffaf0;
    --hub-text: #1a1410;
    --hub-text-soft: #4a3a28;
    --hub-text-muted: #8a7a68;
    --hub-border: #f0d4a8;
    --hub-accent: #f55a1e;
    --hub-glow: rgba(245, 90, 30, 0.4);
}

body[data-showcase="deepseek"] {
    --hub-bg: #ffffff;
    --hub-bg-soft: #f0f7ff;
    --hub-bg-card: #fafdff;
    --hub-text: #0a1428;
    --hub-text-soft: #2a4878;
    --hub-text-muted: #6a8aa8;
    --hub-border: #c8dcf0;
    --hub-accent: #1e6fd8;
    --hub-glow: rgba(30, 111, 216, 0.4);
}

body[data-showcase="openai"] {
    --hub-bg: #ffffff;
    --hub-bg-soft: #f4f8f4;
    --hub-bg-card: #fafcfa;
    --hub-text: #0a1810;
    --hub-text-soft: #2a4828;
    --hub-text-muted: #6a8a68;
    --hub-border: #c8dcc8;
    --hub-accent: #10a37f;
    --hub-glow: rgba(16, 163, 127, 0.4);
}

body[data-showcase="ollama"] {
    --hub-bg: #fafafa;
    --hub-bg-soft: #f0f0f0;
    --hub-bg-card: #ffffff;
    --hub-text: #0a0a0a;
    --hub-text-soft: #3a3a3a;
    --hub-text-muted: #8a8a8a;
    --hub-border: #d4d4d4;
    --hub-accent: #4a4a4a;
    --hub-glow: rgba(74, 74, 74, 0.4);
}

/* -----------------------------------------------------------
   3. Reset minimaliste
   ----------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--hub-text);
    background-color: var(--hub-bg);
    transition: var(--transition-bg);
    min-height: 100vh;
}

/* -----------------------------------------------------------
   4. Header
   ----------------------------------------------------------- */
.hub-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 16px 32px;
    background-color: var(--hub-bg);
    border-bottom: 1px solid var(--hub-border);
    transition: var(--transition-bg);
    gap: 24px;
}

.hub-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--hub-text);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.hub-header__brand-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--hub-accent), var(--hub-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    transition: var(--transition-bg);
}

.hub-header__brand-text small {
    display: block;
    font-size: 11px;
    color: var(--hub-text-muted);
    font-weight: 400;
    margin-top: 1px;
}

.hub-header__nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.hub-header__nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--hub-text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hub-header__nav a:hover {
    background-color: var(--hub-bg-soft);
    color: var(--hub-accent);
}

.hub-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lang & theme toggles */
.lang-toggle, .theme-toggle {
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--hub-border);
    color: var(--hub-text-soft);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle { padding: 0 12px; gap: 6px; }
.theme-toggle { width: 36px; padding: 0; }

.lang-toggle:hover, .theme-toggle:hover {
    border-color: var(--hub-accent);
    color: var(--hub-accent);
    background-color: var(--hub-bg-soft);
}

.lang-toggle .lang-current { opacity: 1; }
.lang-toggle .lang-other { opacity: 0.4; }
.lang-toggle .lang-sep { opacity: 0.3; margin: 0 2px; }

.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* -----------------------------------------------------------
   5. Hero — bannière image map des 7 robots
   ----------------------------------------------------------- */
.hero {
    padding: 48px 32px 24px 32px;
    text-align: center;
}

.hero__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--hub-text);
}

.hero__title .accent {
    background: linear-gradient(120deg, var(--hub-accent), var(--hub-glow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--hub-text-soft);
    max-width: 720px;
    margin: 0 auto 8px auto;
    line-height: 1.5;
}

.hero__subtitle strong { color: var(--hub-text); }

.hero__hint {
    font-size: 13px;
    color: var(--hub-text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Image map wrapper — responsive */
.hero__map {
    position: relative;
    width: min(1400px, 95vw);
    margin: 32px auto 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--hub-border);
    aspect-ratio: 1536 / 1024;
    background-color: #000;
}

.hero__map-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

/* Zones cliquables — positionnées en pourcentage pour rester responsive */
.hot-zone {
    position: absolute;
    cursor: pointer;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hot-zone:hover {
    border-color: var(--hub-accent);
    background-color: rgba(212, 136, 74, 0.12);
    box-shadow: 0 0 30px var(--hub-glow);
    z-index: 5;
}

.hot-zone[data-status="coming-soon"]:hover {
    border-color: #c97c3a;
    background-color: rgba(201, 124, 58, 0.10);
    box-shadow: 0 0 24px rgba(201, 124, 58, 0.4);
}

/* Coordonnees des 7 personnages (en %) */
.zone-claude    { left: 0%;  top: 35%; width: 22%; height: 60%; }
.zone-cerebras  { left: 13%; top: 8%;  width: 19%; height: 35%; }
.zone-mistral   { left: 28%; top: 12%; width: 19%; height: 70%; }
.zone-groq      { left: 42%; top: 14%; width: 17%; height: 50%; }
.zone-deepseek  { left: 49%; top: 24%; width: 22%; height: 60%; z-index: 3; }
.zone-openai    { left: 70%; top: 12%; width: 22%; height: 50%; }
.zone-ollama    { left: 73%; top: 42%; width: 27%; height: 55%; z-index: 4; }

/* Tooltip qui apparait au hover */
.tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 200;
    background-color: var(--hub-bg-card);
    color: var(--hub-text);
    border: 1px solid var(--hub-accent);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    max-width: 320px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px var(--hub-glow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 14px;
    line-height: 1.5;
}

.tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip__provider {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hub-accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.tooltip__nickname {
    font-weight: 700;
    font-size: 16px;
    color: var(--hub-text);
    margin-bottom: 6px;
}

.tooltip__phrase {
    color: var(--hub-text-soft);
    font-size: 13px;
}

.tooltip__cta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--hub-border);
    font-size: 12px;
    color: var(--hub-accent);
    font-weight: 600;
}

.tooltip__cta--coming {
    color: var(--hub-text-muted);
}

/* -----------------------------------------------------------
   6. Section "Pourquoi ces formations" / Manifeste
   ----------------------------------------------------------- */
.manifesto {
    padding: 80px 32px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.manifesto__label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-accent);
    font-weight: 700;
    padding: 6px 14px;
    border: 1px solid var(--hub-accent);
    border-radius: 99px;
    margin-bottom: 16px;
}

.manifesto h2 {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--hub-text);
}

.manifesto p {
    font-size: 17px;
    color: var(--hub-text-soft);
    margin-bottom: 16px;
    line-height: 1.7;
}

.manifesto__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

.pillar {
    padding: 20px;
    background-color: var(--hub-bg-soft);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-md);
    transition: var(--transition-bg);
}

.pillar__icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.pillar h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--hub-text);
    margin-bottom: 6px;
}

.pillar p {
    font-size: 13px;
    color: var(--hub-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* -----------------------------------------------------------
   7. Section "Cards des 7 providers"
   ----------------------------------------------------------- */
.providers {
    padding: 80px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.providers__header {
    text-align: center;
    margin-bottom: 48px;
}

.providers__header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--hub-text);
    margin-bottom: 12px;
}

.providers__header p {
    font-size: 17px;
    color: var(--hub-text-soft);
}

.providers__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Carte provider — chacune dans sa propre charte (override hub vars) */
.p-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--p-card-border);
    background-color: var(--p-card-bg);
    color: var(--p-card-text);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.p-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--p-card-accent);
}

.p-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 0 2px var(--p-card-accent);
}

.p-card__provider {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p-card-accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.p-card__name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--p-card-text);
    letter-spacing: -0.01em;
}

.p-card__nickname {
    font-style: italic;
    color: var(--p-card-text-soft);
    font-size: 15px;
    margin-bottom: 16px;
}

.p-card__desc {
    font-size: 14px;
    color: var(--p-card-text-soft);
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.p-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--p-card-border);
}

.p-card__modules {
    font-size: 12px;
    color: var(--p-card-text-soft);
    font-family: var(--font-mono);
}

.p-card__status {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
}

.p-card__status--ready {
    background-color: var(--p-card-accent);
    color: var(--p-card-bg);
}

.p-card__status--coming {
    background-color: transparent;
    border: 1px solid var(--p-card-text-soft);
    color: var(--p-card-text-soft);
}

.p-card__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--p-card-accent);
}

.p-card__cta::after {
    content: '→';
    transition: transform 0.2s ease;
}

.p-card:hover .p-card__cta::after {
    transform: translateX(4px);
}

/* === Chartes par provider === */
.p-card--claude {
    --p-card-bg: #faf9f5;
    --p-card-text: #1a1814;
    --p-card-text-soft: #4a463e;
    --p-card-border: #e5dfc9;
    --p-card-accent: #b87333;
}

.p-card--cerebras {
    --p-card-bg: #fafafa;
    --p-card-text: #0a0a0a;
    --p-card-text-soft: #4a4a4a;
    --p-card-border: #d4d4d4;
    --p-card-accent: #ff4520;
}

.p-card--mistral {
    --p-card-bg: #0a0a0a;
    --p-card-text: #fff5e6;
    --p-card-text-soft: #ffb84a;
    --p-card-border: #4a1a08;
    --p-card-accent: #ff5722;
}

.p-card--groq {
    --p-card-bg: #ffffff;
    --p-card-text: #1a1410;
    --p-card-text-soft: #4a3a28;
    --p-card-border: #f0d4a8;
    --p-card-accent: #f55a1e;
}

.p-card--deepseek {
    --p-card-bg: #ffffff;
    --p-card-text: #0a1428;
    --p-card-text-soft: #2a4878;
    --p-card-border: #c8dcf0;
    --p-card-accent: #1e6fd8;
}

.p-card--openai {
    --p-card-bg: #ffffff;
    --p-card-text: #0a1810;
    --p-card-text-soft: #2a4828;
    --p-card-border: #c8dcc8;
    --p-card-accent: #10a37f;
}

.p-card--ollama {
    --p-card-bg: #fafafa;
    --p-card-text: #0a0a0a;
    --p-card-text-soft: #3a3a3a;
    --p-card-border: #d4d4d4;
    --p-card-accent: #4a4a4a;
}

/* -----------------------------------------------------------
   8. Section transversales
   ----------------------------------------------------------- */
.transversales {
    padding: 80px 32px;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--hub-border);
    transition: var(--transition-bg);
}

.transversales__header {
    text-align: center;
    margin-bottom: 40px;
}

.transversales__header h2 {
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 800;
    color: var(--hub-text);
    margin-bottom: 8px;
}

.transversales__header p {
    font-size: 15px;
    color: var(--hub-text-soft);
}

.transversales__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.t-card {
    padding: 20px;
    background-color: var(--hub-bg-soft);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    color: var(--hub-text);
}

.t-card:hover {
    border-color: var(--hub-accent);
    transform: translateY(-2px);
    background-color: var(--hub-bg-card);
}

.t-card__icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.t-card__title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--hub-text);
}

.t-card__desc {
    font-size: 12px;
    color: var(--hub-text-muted);
    line-height: 1.4;
}

/* -----------------------------------------------------------
   9. Footer
   ----------------------------------------------------------- */
.hub-footer {
    padding: 48px 32px 32px 32px;
    text-align: center;
    border-top: 1px solid var(--hub-border);
    color: var(--hub-text-muted);
    font-size: 13px;
    transition: var(--transition-bg);
}

.hub-footer__links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hub-footer__links a {
    color: var(--hub-text-soft);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hub-footer__links a:hover {
    color: var(--hub-accent);
}

.hub-footer__credit {
    margin-top: 8px;
    font-size: 12px;
    color: var(--hub-text-muted);
}

.hub-footer__credit strong { color: var(--hub-text-soft); }

/* -----------------------------------------------------------
   10. Responsive
   ----------------------------------------------------------- */
@media (max-width: 900px) {
    .hub-header { padding: 12px 20px; gap: 12px; }
    .hub-header__nav { display: none; }
    .hero { padding: 32px 20px 16px 20px; }
    .manifesto, .providers, .transversales { padding: 56px 20px; }
    .providers__grid { grid-template-columns: 1fr; }
    .tooltip { max-width: 260px; font-size: 12px; }
}

@media (max-width: 600px) {
    .hero__map { width: 100%; }
    .hub-header__brand-text small { display: none; }
}

/* -----------------------------------------------------------
   11. Animations utilitaires
   ----------------------------------------------------------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero, .manifesto, .providers, .transversales {
    animation: fadeUp 0.6s ease backwards;
}

.manifesto { animation-delay: 0.1s; }
.providers { animation-delay: 0.2s; }
.transversales { animation-delay: 0.3s; }
