/* Nouvelle apparence du site (correctif 44), chargée après app.css sur toutes les pages publiques.
   Même esprit que l'accueil : pages plus larges qui grandissent avec l'écran, grands titres, blocs pleins aux coins
   arrondis (fini les angles taillés et les cadres partout), textes un peu plus grands.
   Pour revenir à l'ancienne apparence : retirer la ligne « refonte.css » de app/templates/header.php. */

/* --- 1. Réglages généraux ------------------------------------------------------------------------------------------- */
:root {
  --bg: #090D18;
  --bg-2: #0F1524;
  --bg-3: #141C2E;
  --bg-4: #1C2740;
  --bg-input: #0C111E;
  --line: #1E2942;
  --line-strong: #32405F;
  --steel: #A5B0C4;
  --steel-dim: #8490A8;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --cut: 0px;
  --container: 1440px;
  --header-h: 72px;
  --radius: 18px;
  --radius-sm: 12px;
}
body { background: var(--bg); font-size: 1.0625rem; }
body::before { display: none; }

/* Grands écrans : tout le site s'agrandit d'un bloc (menu, pages, pied de page), au lieu de rester petit au milieu */
@media (min-width: 1680px) { body { zoom: 1.06; } }
@media (min-width: 1800px) { body { zoom: 1.1; } }
@media (min-width: 1920px) { body { zoom: 1.13; } }
@media (min-width: 2100px) { body { zoom: 1.2; } }
@media (min-width: 2300px) { body { zoom: 1.27; } }
@media (min-width: 2500px) { body { zoom: 1.34; } }
@media (min-width: 2900px) { body { zoom: 1.45; } }
@media (min-width: 3400px) { body { zoom: 1.6; } }
@media (min-width: 3800px) { body { zoom: 1.8; } }
/* Pack ta Base garde sa taille : ses cartes et son arène se jouent au pixel près */
body.section-pack { zoom: 1; }

/* --- 2. Titres et têtes de page -------------------------------------------------------------------------------------- */
h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
@media (min-width: 1024px) { h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); } h2, .h2 { font-size: 1.75rem; } }
h2, .h2 { font-weight: 800; letter-spacing: -.015em; }

.site-main { padding-top: 0; }
.site-main > .container:first-child { padding-top: 40px; }
/* La tête de page (titre, phrase, boutons) devient un bandeau sur toute la largeur */
.site-main > .container:first-child > .page-head:first-child {
  margin: -40px 0 36px; padding: 56px 0 44px;
  background: #0B1020; box-shadow: 0 0 0 100vmax #0B1020; clip-path: inset(0 -100vmax);
  align-items: center;
}
.page-head__lead { font-size: 1.125rem; line-height: 1.5; color: #C3CCDC; max-width: 40rem; margin-top: 12px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 1.5rem; }
.breadcrumb { margin-bottom: 14px; }

/* --- 3. Menu et pied de page ------------------------------------------------------------------------------------------ */
.site-header { background: rgba(9, 13, 24, .86); border-bottom-color: rgba(118, 215, 255, .12); }
@media (min-width: 1120px) { .site-header .container { max-width: var(--container); } }
.brand { font-size: 1.375rem; letter-spacing: .06em; }
.brand__logo { height: 38px; }
.primary-nav > ul > li > a[aria-current="page"]::after, .primary-nav summary[aria-current="page"]::after { bottom: -15px; }
.dropdown__panel { border: 0; border-radius: 16px; background: #141C2E; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .75); overflow: hidden; }
.menu-list a, .menu-list button { border-radius: 10px; }
.search-inline, .search-inline input { border-radius: var(--radius-sm); }
.xp-chip, .user-trigger { border-radius: var(--radius-sm); }
.icon-btn { border-radius: var(--radius-sm); }
.site-footer { background: #070A12; border-top: 0; padding: 56px 0 36px; font-size: var(--fs-sm); }
.site-footer h2 { font-size: 1rem; }
.site-footer__social a { border-radius: var(--radius-sm); }
.tabbar { background: rgba(12, 18, 34, .96); }
.drawer__panel { background: #0C1222; }

/* --- 4. Boutons, champs, étiquettes ------------------------------------------------------------------------------------ */
.btn { height: 46px; padding: 0 20px; border-radius: var(--radius-sm); clip-path: none; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.btn:hover { transform: translateY(-1px); }
.btn--sm { height: 38px; padding: 0 14px; border-radius: 10px; font-size: var(--fs-sm); }
.btn--xs { height: 30px; padding: 0 10px; border-radius: 8px; }
.btn--lg { height: 56px; padding: 0 30px; border-radius: 14px; font-size: 1.125rem; }
.btn--icon { width: 46px; }
.btn--sm.btn--icon { width: 38px; }
.btn--primary { color: #090D18; }
.btn--ghost, .btn--danger, .btn--success, .btn.is-active { background-image: none; box-shadow: inset 0 0 0 1.5px var(--edge); }
.btn--ghost { --edge: rgba(244, 247, 255, .32); }
.btn--link { height: auto; padding: 0; border-radius: 0; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
@media (max-width: 480px) { .btn { min-height: 46px; } }

.input, .select, .textarea { border-radius: var(--radius-sm); padding: 12px 14px; border-color: var(--line); background-color: var(--bg-input); }
.tag { padding: 4px 10px; border-radius: 8px; }
.callout { border-left: 0; border-radius: 14px; padding: 16px 18px; font-size: var(--fs-sm); }
code, kbd { border-radius: 6px; }

/* --- 5. Blocs ---------------------------------------------------------------------------------------------------------- */
.panel { padding: 24px; border-radius: var(--radius); clip-path: none; background: var(--panel-bg); }
.panel::before { display: none; }
@media (min-width: 640px) { .panel { padding: 28px; } }
.panel--tight { padding: 18px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel--glow { box-shadow: inset 0 0 0 1.5px rgba(118, 215, 255, .32); }
.panel--volt { box-shadow: inset 0 0 0 1.5px rgba(148, 117, 255, .4); }
.panel--gold { box-shadow: inset 0 0 0 1.5px rgba(255, 200, 87, .4); }
.panel--danger { box-shadow: inset 0 0 0 1.5px rgba(255, 92, 122, .4); }
.panel__title { font-size: 1.25rem; }

.post, .lfg-card, .lfg-detail, .versus, .podium__step, .stat-strip, .table-wrap, .topic-list, .empty, .embed, .toast, .spotlight__frame, .spotlight-page__banner, .profile-banner, .tournament-banner, .tournament-card__banner, .post__image {
  clip-path: none; border-radius: var(--radius);
}
.post, .table-wrap, .stat-strip, .topic-list { border: 0; background: var(--bg-2); overflow: hidden; }
.lfg-card, .lfg-detail { background: var(--bg-2); }
.lfg-card::before, .lfg-detail::before, .toast::before { clip-path: none; border-radius: calc(var(--radius) - 1px); }
.post { padding: 22px; }
.post__image, .embed, .tournament-card__banner { border-radius: var(--radius-sm); }
.tournament-card__banner { margin: 0; }
.tournament-banner, .profile-banner { border-radius: 22px; }
.stat-strip > div { border-color: var(--line); padding: 18px 20px; }
.stat-strip dd { font-size: 1.5rem; font-weight: 800; }
.table th { background: transparent; padding: 14px 16px; }
.table td { padding: 14px 16px; }
.table { font-size: var(--fs-sm); }
.topic-row { padding: 16px 22px; }
.empty { background: var(--bg-2); border: 0; }

.avatar, .avatar.has-frame > img, .avatar.has-frame > .avatar__initials, .icon-tile, .notif__icon, .toast__icon, .connection__icon, .quickaction__icon, .team-logo { clip-path: none; border-radius: 22%; }
.msg--theirs .msg__bubble, .msg--mine .msg__bubble { clip-path: none; border-radius: 16px; }
.meter, .meter__fill, .meter--lg, .rating-bars__track { clip-path: none; border-radius: 99px; }

/* Onglets : plus grands, sans trait sous toute la ligne */
.tabs { gap: 8px; border-bottom: 0; margin-bottom: 28px; }
.tabs a, .tabs button { font-size: 1rem; font-weight: 700; padding: 10px 16px; border-radius: 99px; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--ice); color: #090D18; }
.tabs [aria-current="page"]::after, .tabs [aria-selected="true"]::after { display: none; }
.tabs [aria-current="page"] .count, .tabs [aria-selected="true"] .count { color: #10203A; }

/* Listes */
.list-row { padding: 16px 0; }
.list-row__title { font-weight: 700; }

/* --- 6. Tournois et équipes --------------------------------------------------------------------------------------------- */
.tournament-card, .team-card { transition: transform .15s var(--ease-out), background-color .15s; }
a.tournament-card:hover, a.team-card:hover, .tournament-card:hover, .team-card:hover { transform: translateY(-3px); }
.tournament-card h2, .tournament-card h3, .team-card h2, .team-card h3 { font-size: 1.375rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .tournament-card:hover, .team-card:hover { transform: none; }
}

/* --- 7. En-tête sur toute la largeur (page d'un tournoi, page d'une équipe) --------------------------------------------- */
.page-hero {
  margin-bottom: 36px; padding: 40px 0 44px;
  background: linear-gradient(120deg, #0E1A30, #13122E 60%, #1B1238);
}
.page-hero--image {
  background:
    linear-gradient(90deg, #090D18 0%, rgba(9, 13, 24, .9) 32%, rgba(9, 13, 24, .45) 68%, rgba(9, 13, 24, .7) 100%),
    linear-gradient(0deg, rgba(9, 13, 24, .85), rgba(9, 13, 24, 0) 45%),
    var(--hero-img) center / cover no-repeat #0B1020;
}
/* Tournoi sans bannière : le trophée du site, entier, à droite */
.page-hero--tournament:not(.page-hero--image) {
  background:
    url("../images/home/trophee-clanbase.webp") right 9% bottom -6px / auto 108% no-repeat,
    radial-gradient(ellipse 26% 80% at 80% 70%, rgba(118, 215, 255, .16), transparent 72%),
    radial-gradient(ellipse 24% 76% at 92% 62%, rgba(148, 117, 255, .2), transparent 72%),
    #090D18;
}
.page-hero > .container { display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; }
.page-hero__crumb { margin-bottom: auto; padding-bottom: 28px; font-size: var(--fs-sm); color: var(--steel); }
.page-hero .page-head { margin: 0; align-items: flex-end; }
.page-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); margin: 6px 0 4px; }
.page-hero .tag:not([class*="tag--"]) { background: rgba(28, 39, 64, .85); }
.page-hero .profile-head { margin-top: 0; padding: 0; align-items: flex-end; }
.page-hero .profile-head__name { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 800; }
.page-hero .team-logo--lg { width: 112px; height: 112px; font-size: 2rem; }
.page-hero .team-short { margin: 18px 0 0; }
@media (max-width: 719px) {
  .page-hero { padding: 24px 0 28px; margin-bottom: 24px; }
  .page-hero > .container { min-height: 220px; }
  .page-hero--tournament:not(.page-hero--image) { background:
    linear-gradient(0deg, #090D18 22%, rgba(9, 13, 24, .55) 70%, rgba(9, 13, 24, .2) 100%),
    url("../images/home/trophee-clanbase.webp") center top 8px / auto 250px no-repeat #090D18; }
}
