/* Pool Meilleur 30 — modern, minimal, responsive stylesheet */

:root {
    --bg: #0f1420;
    --surface: #ffffff;
    --surface-2: #f4f6fb;
    --ink: #12182a;
    --ink-soft: #4a556e;
    --muted: #7b869c;
    --line: #e4e8f1;
    --primary: #1d4ed8;
    --primary-dark: #1739a8;
    --accent: #06b6d4;
    --danger: #dc2626;
    --ok: #16a34a;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--surface-2);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: .2em 0 .4em; }
h2 { font-size: 1.5rem; margin: 1.6em 0 .6em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 48px; }
.narrow { max-width: 560px; }
.ta-center { text-align: center; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger) !important; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin: 0; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(15,20,32,.92); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); font-size: .82rem; font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #c9d2e4; font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a.is-active { color: #fff; text-decoration: none; }
.nav-user { color: #8ea0c0; font-size: .9rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 600; font-size: .95rem; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: .15s ease; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-xs { padding: 5px 12px; font-size: .82rem; border-radius: 8px; }
.btn-add { background: var(--surface-2); color: var(--primary); border-color: var(--line); }
.btn-add:hover { background: var(--primary); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: #fee2e2; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-remove { background: #fff; border: 1px solid var(--line); color: var(--danger); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; line-height: 1; }
.btn-remove:hover { background: #fee2e2; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 500px at 80% -10%, #1c2740, var(--bg)); color: #eaf0fb; }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; padding-block: 72px; }
.hero-copy h1 { color: #fff; }
.hero .lead { font-size: 1.15rem; color: #c3cde2; max-width: 46ch; }
.hero .lead strong, .hero-copy h1 strong { color: #fff; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero-note { margin-top: 22px; color: #93a1c0; font-size: .9rem; }
.hero-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 28px; }
.cap-widget { text-align: center; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.cap-label { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: #8ea0c0; }
.cap-value { display: block; font-size: 4rem; font-weight: 800; color: #fff; line-height: 1; }
.cap-sub { color: #8ea0c0; font-size: .85rem; }
.cap-sample { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.cap-sample li { display: flex; align-items: center; gap: 10px; color: #d5deef; font-size: .92rem; }

/* ---------- Cote badges ---------- */
.badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; font-weight: 700; font-size: .82rem; color: #fff; }
.cote-1 { background: #64748b; } .cote-2 { background: #0891b2; } .cote-3 { background: #0d9488; }
.cote-4 { background: #16a34a; } .cote-5 { background: #ca8a04; } .cote-6 { background: #ea580c; }
.cote-7 { background: #dc2626; } .cote-8 { background: #9333ea; }

/* ---------- Steps / sections ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--primary); font-weight: 700; margin-bottom: 10px; }
.step h3 { margin: 6px 0; }
.step p { color: var(--ink-soft); margin: 0; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); flex-wrap: wrap; }
.cta-band h2 { margin: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 780px; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 1.2em; }
.prose ul, .prose ol { color: var(--ink-soft); }
.prose li { margin: .35em 0; }
.callout { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 18px; box-shadow: var(--shadow); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }

/* ---------- Forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form .field { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.req { color: var(--danger); }
.input, input[type=text], input[type=email], input[type=tel], input[type=search], select {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.input:focus, input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
.fineprint { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin: 18px 0 0; font-size: .92rem; }
.alert-success { background: #dcfce7; color: #14532d; }
.alert-error { background: #fee2e2; color: #7f1d1d; }
.alert-info { background: #dbeafe; color: #1e3a8a; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input { flex: 1; min-width: 160px; }
.toolbar select { flex: 0 0 auto; width: auto; }

/* ---------- Drafts list ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form .input { width: auto; }
.section-title { font-size: 1.2rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.team-card.is-submitted { border-color: #bbf7d0; }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.team-card-head h3 { margin: 0; font-size: 1.1rem; }
.pill { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill-ok { background: #dcfce7; color: #15803d; }
.team-card-stats { display: flex; gap: 24px; }
.stat-value { display: block; font-size: 1.4rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--muted); }
.team-card-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); }
.card-warn { font-size: .82rem; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 8px 10px; margin: 0; }
#withdraw-form { margin-top: 8px; }
.builder-hint { margin-top: 0; margin-bottom: 20px; }
.builder-hint a { font-weight: 600; }

/* ---------- Login ---------- */
.login-card { margin-top: 8px; }
.login-methods { display: flex; flex-direction: column; gap: 12px; }
.btn-oauth { border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; }
.btn-oauth:hover { background: var(--surface-2); }
.btn-oauth .oauth-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-weight: 800; color: #fff; font-size: .8rem; }
.btn-google .oauth-ico { background: #ea4335; }
.btn-ms .oauth-ico { background: #0067b8; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 4px 0; }
.or-sep::before, .or-sep::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.nav-logout { color: #c9d2e4; font-size: .9rem; }
.nav-logout:hover { color: #fff; }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15, 20, 32, .55); backdrop-filter: blur(3px); }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 460px; width: 100%; padding: 28px; animation: modal-in .18s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal h2 { margin: 0 0 12px; font-size: 1.35rem; }
.modal p { margin: 0 0 10px; color: var(--ink-soft); }
.modal-callout { background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm); padding: 16px 18px; margin: 16px 0; }
.modal-callout p { color: #7c2d12; }
.modal-callout strong { color: #9a3412; }
.modal-email { font-weight: 700; font-size: 1.05rem; color: var(--ink) !important; word-break: break-all; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 480px) {
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn { width: 100%; }
}

/* ---------- Builder ---------- */
.builder-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.roster-panel { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.cap-meter-head, .cap-meter-foot { display: flex; justify-content: space-between; font-size: .9rem; }
.cap-meter-head { margin-bottom: 8px; }
.cap-meter-foot { margin-top: 8px; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--ok), var(--accent)); width: 0; transition: width .25s ease, background .25s ease; }
.progress-bar.is-over { background: var(--danger); }
.roster-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roster-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.roster-item .r-name { flex: 1; font-weight: 500; font-size: .92rem; }
.roster-item .r-team { color: var(--muted); font-size: .8rem; }
.validation-msgs { margin-top: 14px; }
.validation-msgs .vmsg { font-size: .85rem; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; margin-bottom: 6px; }
.validation-msgs .vmsg.ok { background: #dcfce7; color: #15803d; }
#submit-form { margin-top: 16px; }
.save-status { font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.save-status.saved { color: var(--ok); }
.pool-scroll { max-height: 70vh; overflow-y: auto; }
.pool-panel .toolbar { position: sticky; top: 0; }
.back-link { display: inline-block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.title-input { font-size: 1.6rem; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; width: 100%; max-width: 480px; }
.title-input:hover { border-color: var(--line); }
.empty-hint { color: var(--muted); font-size: .9rem; text-align: center; padding: 16px 0; }
tr.is-selected { opacity: .45; }
tr.is-selected .btn-add { pointer-events: none; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+'; display: inline-block; width: 20px; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::before { content: '–'; }
.faq-item p { margin: 0 0 14px; color: var(--ink-soft); padding-left: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); color: #aab6cf; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-block: 32px; flex-wrap: wrap; }
.site-footer strong { color: #fff; }
.site-footer .muted { color: #7e8aa5; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #aab6cf; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-card { order: -1; }
    .steps { grid-template-columns: 1fr; }
    .builder-grid { grid-template-columns: 1fr; }
    .roster-panel { position: static; }
}
@media (max-width: 680px) {
    .nav-toggle { display: flex; }
    .site-nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; display: none; }
    .site-nav.open { display: flex; }
    .site-nav a, .nav-user { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .page-head { flex-direction: column; }
    .inline-form { width: 100%; }
    .inline-form .input { flex: 1; }
}
