/* Alignements communs — conserve le thème et les composants existants. */
main, .container, .app-card, .auth-card, .admin-row, .contact-form { min-width: 0; }
:where(.app-grid,.form-row,.cards,.dashboard-grid,.dashboard-stats,.contact-grid,.forum-layout,.moderation-layout,.split-heading,.about-grid) > * { min-width: 0; }
.app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.form-row { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.button { max-width: 100%; min-height: 48px; line-height: 1.45; text-align: center; white-space: normal; overflow-wrap: anywhere; gap: 12px; }
.admin-actions { align-items: stretch; gap: 12px; margin-top: 18px; }
.admin-actions > form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0; min-width: 0; max-width: 100%; }
.admin-actions > form > .button { height: 100%; }
.toolbar > *, .hero-actions > *, .pagination > *, .forum-search > div > * { min-width: 0; max-width: 100%; }
form.toolbar { justify-content: flex-start; gap: 12px 18px; }
.toolbar input, .toolbar select, .field input, .field select, .field textarea { max-width: 100%; min-width: 0; }
.toolbar input, .toolbar select { min-height: 48px; padding: 10px 12px; border: 1px solid #57514a; border-radius: 5px; background: #0d0f12; color: var(--text); }
.field > label { line-height: 1.45; }
.field input[type="checkbox"], .field input[type="radio"] { display: inline-block; width: auto; min-height: 0; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--gold); }
input[type="file"] { overflow: hidden; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.app-card h2, .admin-row h2, .dashboard-card h2, .ticket-card h2, .message-head strong, .conversation-link strong, .notification-item, .role-tag, .status, .member-table td { overflow-wrap: anywhere; }
.dashboard-card { display: flex; flex-direction: column; }
.dashboard-card p { margin: auto 0 0; padding-top: 10px; }
.dashboard-stats .stat-card span { overflow-wrap: anywhere; }
.ticket-list { gap: 16px; }
.ticket-top, .ticket-bottom, .message-head { align-items: flex-start; }
.conversation-link > *, .notification-item > div { min-width: 0; }
.notification-item time { white-space: normal; }
.forum-search { min-width: min(220px,100%); }
.forum-search > div { min-width: 0; }
.live-grid { grid-template-columns: repeat(auto-fit,minmax(min(270px,100%),1fr)); }
.live-card > div { min-width: 0; }
.result-form { align-items: stretch; flex-wrap: wrap; }
.result-form select { min-width: 0; min-height: 44px; flex: 1; }
.result-form button { min-height: 44px; border-radius: 4px; }
.calendar-scroll, .member-table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.member-table th, .member-table td { line-height: 1.5; }
.footer-main > *, .maintenance-notice > *, .birthday-banner > * { min-width: 0; overflow-wrap: anywhere; }
.nav-clock { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 82px; min-height: 36px; margin-top: 0; margin-bottom: 0; }
.nav-signout { display: flex; align-items: center; }
.nav-signout button { min-height: 44px; }
.nav .nav-notifications { display: flex; align-items: center; gap: 8px; }
.site-header .nav { max-width: 100%; }

/* Menu déroulant mobile ; liens visibles sur ordinateur. */
@media(max-width:1100px) {
  .site-header .menu-toggle { display: flex; flex-direction: column; gap: 5px; justify-content: center; width: 45px; height: 45px; background: transparent; border: 1px solid #745936; border-radius: 3px; order: 2; flex: none; }
  .site-header .menu-toggle span { height: 2px; width: 21px; background: var(--gold); margin: 0 auto; }
  .site-header .header-inner { flex-wrap: nowrap; gap: 16px; }
  .site-header .nav-clock { margin-left: auto; order: 0; }
  .site-header .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin-left: 0; padding: 16px max(18px,calc((100vw - 1200px)/2)); background: #0d0e10; border-bottom: 1px solid #624a2b; flex-direction: column; align-items: stretch; gap: 0; white-space: normal; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; }
  .site-header .nav.open { display: flex; }
  .site-header .nav a, .site-header .nav-signout button { min-height: 44px; padding: 11px 0; white-space: normal; text-align: left; }
  .site-header .nav a:last-child, .site-header .nav .account-link { border: 0; }
  .site-header .nav-signout button { width: 100%; }
}
@media(min-width:1101px) {
  .site-header .header-inner { width: min(1800px,calc(100% - 32px)); flex-wrap: nowrap; gap: clamp(10px,1vw,20px); padding: 0; min-height: 82px; }
  .site-header .brand { order: 0; }
  .site-header .nav-clock { order: 2; margin-left: 0; min-width: 76px; }
  .site-header .menu-toggle { display: none; }
  .site-header .nav, .site-header .nav.open { display: flex; position: static; order: 1; flex: 0 1 auto; flex-direction: row; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: clamp(6px,.7vw,13px); margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; max-height: none; overflow: visible; white-space: nowrap; }
  .site-header .nav a, .site-header .nav-signout button, .site-header .nav-dropdown > summary { padding: 8px 0; min-height: 40px; font-size: clamp(.76rem,.8vw,.87rem); white-space: nowrap; }
  .site-header .nav a:last-child, .site-header .nav .account-link, .site-header .nav .nav-notifications { border: 0; }
  .site-header .nav-signout button { width: auto; }
}
@media(min-width:1101px) and (max-width:1550px) {
  .site-header .brand span { display: none; }
  .site-header .brand img { width: 48px; height: 48px; }
  .site-header .nav-clock { font-size: .74rem; padding: 8px; }
}

/* Suivi personnel des matchs. */
.match-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.match-filters .button { gap: 10px; min-height: 44px; padding: 10px 16px; }
.match-filters .button span { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 2px 6px; border-radius: 20px; background: #0002; }
.personal-match-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: stretch; }
.personal-match-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #42392b; border-radius: 12px; padding: 26px; background: linear-gradient(145deg,#191b20,#111317); }
.personal-match-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.personal-match-head .eyebrow { margin: 8px 0 12px; }
.personal-match-card h2 { font: 800 1.4rem/1.35 Manrope,Arial,sans-serif; margin: 12px 0; overflow-wrap: anywhere; }
.personal-match-date { color: #dfc18a; font-weight: 700; line-height: 1.5; margin: 0 0 18px; }
.personal-match-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0 0 20px; }
.personal-match-details dt { color: var(--muted); font-size: .82rem; margin-bottom: 6px; }
.personal-match-details dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.match-progress { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.match-progress > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #0c0e11; border: 1px solid #383636; border-radius: 7px; }
.match-progress span { color: var(--muted); font-size: .8rem; }
.match-progress strong { font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.match-feedback { margin: 0 0 18px; padding: 15px; background: #30241b; border-left: 3px solid #bd9150; border-radius: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.match-feedback p { margin: 8px 0 0; color: #e0d2bc; }
.personal-match-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.personal-match-actions .button { flex: 1 1 190px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
@media(max-width:900px) { .app-grid { grid-template-columns: 1fr; } }
@media(max-width:700px) {
  .personal-match-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .forum-post-actions textarea { width: 100%; max-width: 100%; }
  .forum-post-actions details { width: 100%; }
  .admin-actions > form { flex: 1 1 180px; }
  .admin-actions > .button, .admin-actions > form > .button { width: 100%; }
  .site-header .nav { max-height: calc(100dvh - 76px); }
  .hero-caption { letter-spacing: .06em; flex-wrap: wrap; }
}
@media(max-width:480px) {
  .personal-match-card { padding: 20px; }
  .match-progress { grid-template-columns: 1fr; }
  .personal-match-actions .button { flex-basis: 100%; }
  .match-filters .button { flex: 1 1 120px; }
  .toolbar { gap: 12px; }
  .toolbar > .button { width: 100%; }
  .nav-clock { min-width: 76px; }
  .empty-state { padding: 24px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } .button:hover, .dashboard-stats .stat-card:hover { transform: none; } }

/* Navigation Match’s : même composant au clic, au clavier et sur mobile. */
.site-header .nav-dropdown { position: relative; min-width: 0; }
.site-header .nav-dropdown > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; min-height: 40px; padding: 8px 0; cursor: pointer; color: #c3c3c4; font-weight: 600; font-size: .87rem; }
.site-header .nav-dropdown > summary::-webkit-details-marker { display: none; }
.site-header .nav-dropdown > summary:hover, .site-header .nav-dropdown > summary.active, .site-header .nav-dropdown[open] > summary { color: var(--gold); }
.site-header .nav-dropdown > summary span { transition: transform .15s; }
.site-header .nav-dropdown[open] > summary span { transform: rotate(180deg); }
.site-header .nav-submenu { position: absolute; top: 100%; left: 0; z-index: 20; width: 244px; max-width: calc(100vw - 48px); padding: 6px; border: 1px solid #4c4030; border-radius: 10px; background: #111317; box-shadow: 0 18px 45px #0009; }
.site-header .nav .nav-submenu a { display: flex; align-items: center; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 5px; white-space: normal; line-height: 1.4; }
.site-header .nav .nav-submenu a:hover, .site-header .nav .nav-submenu a.active { background: #2b2419; color: var(--gold); }
@media(max-width:1100px) {
  .site-header .nav-dropdown > summary { min-height: 44px; padding: 11px 0; font-size: .91rem; }
  .site-header .nav-submenu { position: static; width: 100%; max-width: 100%; box-shadow: none; margin: 0 0 10px; }
}

@media(min-width:1101px) {
  .site-header .nav-dropdown > summary { gap: 5px; }
  .site-header .nav .nav-submenu a { padding: 11px 13px; font-size: .86rem; min-height: 42px; }
  .site-header .nav-submenu { text-align: left; }
}

/* Même axe vertical pour les liens, le sous-menu et la déconnexion. */
@media(min-width:1101px) {
  .site-header .nav { align-items: center; }
  .site-header .nav > a,
  .site-header .nav-dropdown > summary,
  .site-header .nav-signout > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: clamp(.76rem,.8vw,.87rem);
    font-weight: 600;
    border: 0;
    background: transparent;
  }
  .site-header .nav-dropdown { height: 44px; margin: 0; }
  .site-header .nav-signout { display: flex; align-items: center; height: 44px; margin: 0; padding: 0; }
  .site-header .nav-clock { height: 36px; min-height: 36px; line-height: 1; }
}
/* Chevron géométrique : ne dépend pas de la ligne de base du caractère. */
.site-header .nav-dropdown > summary > span {
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  font-size: 0;
  line-height: 0;
  transform: rotate(45deg);
}
.site-header .nav-dropdown[open] > summary > span { margin-top: 3px; transform: rotate(225deg); }
