@import url("/assets/ui/forms.css"); /* champs de formulaire lisibles */
/* ==========================================================================
   Sarwyen UI — remplacements HTML/CSS des anciens widgets Flash
   (dimensions et positions reprises des SWF décompilés : swf_export/)
   ========================================================================== */

@font-face {
    font-family: "Uncial Antiqua";
    src: url("fonts/uncial-antiqua.woff2") format("woff2");
    font-display: swap;
}

:root {
    --sw-blue: #3b87b8;
    --sw-blue-dark: #306d96;
    --sw-night: #135c7e;
    --sw-font-title: "Uncial Antiqua", "Libra BT", Georgia, serif;
}

/* --- Logo (ex swf/logotop.swf, 125x150) ---------------------------------- */
.sw-logo { display: block; width: 125px; height: 150px; }
.sw-logo img { width: 125px; height: 150px; display: block; }

/* --- Menu principal (ex swf/menu.swf, scène 400x50 affichée en 300x37) ---- */
.sw-menu { position: relative; width: 300px; height: 37.5px; margin: 0 auto; }
.sw-menu__stage {
    position: absolute; top: 0; left: 0; width: 400px; height: 50px;
    transform: scale(.75); transform-origin: 0 0;
}
.sw-menu__band { position: absolute; left: 0; top: 21px; width: 400px; height: 9px; background: var(--sw-blue-dark); }
.sw-menu__item { position: absolute; display: block; }
.sw-menu__item img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sw-menu__item .sw-menu__over { opacity: 0; }
.sw-menu__item:hover .sw-menu__over,
.sw-menu__item:focus-visible .sw-menu__over { opacity: 1; }
.sw-menu__item:hover .sw-menu__up,
.sw-menu__item:focus-visible .sw-menu__up { opacity: 0; }
.sw-menu__item--map      { left: 6px;      top: 2.2px;  width: 45.6px;  height: 45.66px; }
.sw-menu__item--perso    { left: 72.6px;   top: -1.1px; width: 29.8px;  height: 52.65px; }
.sw-menu__item--messages { left: 127.4px;  top: .15px;  width: 42.6px;  height: 49.65px; }
.sw-menu__item--attacks  { left: 187.15px; top: .1px;   width: 51px;    height: 50px; }
.sw-menu__item--clan     { left: 250.5px;  top: 4px;    width: 68.25px; height: 42px; }
.sw-menu__item--journal  { left: 326.75px; top: 4.35px; width: 73.6px;  height: 45.5px; }
.sw-menu__badge {
    position: absolute; left: 151.5px; top: 28.3px; min-width: 23px; height: 21px;
    font: bold 16px/21px var(--sw-font-title); color: #ff0; text-align: center;
    text-shadow: 0 0 2px #000, 0 0 2px #000; pointer-events: none;
}

/* --- Sphère d'expérience (ex swf/xp.swf, 50x50) ----------------------------- */
.sw-xp {
    --xp: 0;
    position: relative; width: 46px; height: 46px; margin: 2px;
    border: 2px solid #000; border-radius: 50%; overflow: hidden;
    background: #fdf3e2;
}
.sw-xp__fill {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: calc(var(--xp) * 1%);
    background: linear-gradient(#a9dbef, #3a86b9);
    transition: height 1.2s ease-out;
}
.sw-xp__label {
    position: absolute; inset: 0; display: grid; place-items: center;
    font: 15px/1 var(--sw-font-title); color: #000; z-index: 1;
}
.sw-xp__star {
    position: absolute; bottom: -4px; width: 3px; height: 3px; border-radius: 50%;
    background: #fff; opacity: .8; animation: sw-xp-rise 3s linear infinite;
}
.sw-xp__star:nth-child(1) { left: 20%; animation-duration: 2.4s; }
.sw-xp__star:nth-child(2) { left: 40%; animation-duration: 3.1s; animation-delay: .6s; }
.sw-xp__star:nth-child(3) { left: 60%; animation-duration: 2.7s; animation-delay: 1.2s; }
.sw-xp__star:nth-child(4) { left: 75%; animation-duration: 3.4s; animation-delay: 1.8s; }
.sw-xp__star:nth-child(5) { left: 30%; animation-duration: 2.9s; animation-delay: 2.3s; }
@keyframes sw-xp-rise {
    from { transform: translateY(0); opacity: .9; }
    to   { transform: translateY(-46px); opacity: 0; }
}

/* --- Horloge du jeu (ex swf/clock.swf, 200x120) ---------------------------- */
.sw-clock { position: relative; width: 200px; height: 120px; background: var(--sw-blue); }
.sw-clock__window { position: absolute; left: 0; top: 0; width: 200px; height: 104px; overflow: hidden; }
.sw-clock__disc {
    position: absolute; left: -21.55px; top: -91.6px; width: 209px; height: 221px;
    transform-origin: 117.5px 91.5px;
    transition: transform 1s linear;
}
.sw-clock__box {
    position: absolute; left: 8px; top: 95px; width: 178px; height: 22px;
    border-radius: 11px; background: var(--sw-night);
    display: grid; place-items: center;
    font: 11px/1 var(--sw-font-title); color: #fff; white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .sw-xp__star { animation: none; display: none; }
    .sw-clock__disc, .sw-xp__fill { transition: none; }
}

/* --- Barre de karma (ex swf/karma.swf, 100x4 étirée) --------------------- */
.sw-karma {
    position: relative; height: 8px; box-sizing: border-box;
    background: #fff; border: 1px solid #000;
}
.sw-karma::after { /* repère central */
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #036;
}
.sw-karma__bar { position: absolute; top: 0; bottom: 0; }
.sw-karma__bar--pos { left: 50%; }
.sw-karma__bar--neg { right: 50%; }
.sw-karma--good .sw-karma__bar { background: #3cc747; }
.sw-karma--neutral .sw-karma__bar { background: #c1c73c; }
.sw-karma--bad .sw-karma__bar { background: #d94242; }

/* --- Carte du jeu (ex swf/map.swf 750x370 + img/maps/*.swf) ---------------- */
.sw-map { position: relative; width: 750px; height: 370px; user-select: none; }
.sw-map__parchment { position: absolute; inset: 0; width: 750px; height: 370px; pointer-events: none; }
.sw-map__title {
    position: absolute; left: 40px; top: 16px; width: 600px; text-align: center;
    font: 22px/30px var(--sw-font-title); color: #5b3a12;
    text-shadow: 2px 2px 0 #fff3cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    pointer-events: none;
}
.sw-map__board {
    position: absolute; left: 40px; top: 50px; width: 600px; height: 240px; margin: 0;
    display: grid; grid-template-columns: repeat(30, 20px); grid-template-rows: repeat(12, 20px);
    background: no-repeat 0 0 / 600px 240px;
    overflow: hidden;
}
.sw-map__board::after { /* quadrillage : lignes blanches à 13 % tous les 20 px */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        repeating-linear-gradient(to right, transparent 0 19px, rgba(255,255,255,.13) 19px 20px),
        repeating-linear-gradient(to bottom, transparent 0 19px, rgba(255,255,255,.13) 19px 20px);
}
.sw-map__cell {
    display: block; width: 20px; height: 20px; padding: 0; margin: 0; border: 0;
    background: transparent; font: inherit; color: inherit;
}
button.sw-map__cell, a.sw-map__cell { cursor: pointer; }
.sw-map__cell:hover, .sw-map__cell:focus-visible { background: rgba(255,255,255,.45); outline: none; }
.sw-map__cell--neighbor { background: rgba(0,51,204,.31); }
.sw-map__cell--neighbor:hover, .sw-map__cell--neighbor:focus-visible { background: rgba(0,51,204,.55); }
.sw-map__cell--admin { cursor: crosshair !important; }
.sw-map__cell--self { position: relative; }
.sw-map__cell--self::after {
    content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%;
    background: #ff3333; box-shadow: 0 0 0 1px #800, 0 0 6px 2px rgba(255,51,51,.6);
    animation: sw-map-pulse 1.6s ease-in-out infinite;
}
@keyframes sw-map-pulse { 50% { transform: scale(1.35); } }
.sw-map__cell--inactive:hover { background: rgba(0,0,0,.12); }

.sw-map__winpos {
    position: absolute; z-index: 5; padding: 1px 6px; pointer-events: none;
    font: bold 11px/14px Verdana, sans-serif; color: #fff; background: rgba(19,92,126,.9);
    border: 1px solid #fff; border-radius: 3px; transform: translate(12px, 12px); white-space: nowrap;
}
.sw-map__birds { position: absolute; left: 40px; top: 50px; width: 600px; height: 240px; margin: 0; pointer-events: none; overflow: hidden; }
.sw-map__bird {
    position: absolute; left: -30px; width: 30px; height: 30px; padding: 0; border: 0; cursor: pointer;
    pointer-events: auto; background: url("img/map/bird.png") 0 0 no-repeat;
    animation: sw-bird-flap .67s steps(20) infinite, sw-bird-fly 11.5s linear forwards;
}
@keyframes sw-bird-flap { to { background-position: -600px 0; } }
@keyframes sw-bird-fly { to { transform: translateX(660px); } }

@media (prefers-reduced-motion: reduce) {
    .sw-map__cell--self::after { animation: none; }
    .sw-map__bird { display: none; }
}

/* --- Nom du village (ex swf/village_name.swf, 300x30) --------------------- */
.sw-village-name {
    width: 300px; height: 30px; text-align: center; white-space: nowrap; overflow: hidden;
    font: 20px/30px var(--sw-font-title); color: #fff3cf; text-shadow: 2px 2px 0 #4a2a0c;
}

/* --- Pages Laravel (layout game) ------------------------------------------ */
.sw-page { margin: 0; background: var(--sw-blue); font: 13px/1.5 Verdana, Arial, sans-serif; color: #222; }
.sw-page__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 8px; }
.sw-page__center { flex: 1; padding-top: 110px; }
.sw-page__main { max-width: 900px; margin: 0 auto 120px; padding: 0 16px; }
.sw-panel { background: #fbe5b6; border: 3px solid #000; border-radius: 12px; padding: 16px 24px 24px; box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.sw-panel__title { margin: 0 0 12px; font: 32px/1.2 var(--sw-font-title); color: #5b3a12; }
.sw-panel__subtitle { margin: 24px 0 8px; font: 20px/1.2 var(--sw-font-title); color: #5b3a12; }
.sw-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.sw-pack { background: #fff7e2; border: 2px solid #c79a4b; border-radius: 10px; padding: 12px 16px; }
.sw-pack__title { margin: 0 0 6px; font: 20px/1.2 var(--sw-font-title); color: #135c7e; }
.sw-pack__note { font-size: 11px; color: #7a5a2a; margin: 6px 0 0; }
.sw-button { font: bold 13px Verdana, sans-serif; color: #fff; background: #135c7e; border: 2px solid #0b3b52; border-radius: 6px; padding: 6px 16px; cursor: pointer; }
.sw-button:hover, .sw-button:focus-visible { background: #1b7aa6; }
.sw-flash { padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; border: 1px solid; }
.sw-flash--success { background: #e3f7e1; border-color: #3cc747; }
.sw-flash--info { background: #e1f0f7; border-color: #3b87b8; }
.sw-flash--error { background: #fbe1e1; border-color: #d94242; }
.sw-table { width: 100%; border-collapse: collapse; background: #fff7e2; }
.sw-table th, .sw-table td { padding: 4px 8px; border-bottom: 1px solid #e3c98f; text-align: left; }
.sw-wallet { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; background: #fff7e2; border: 2px solid #c79a4b; border-radius: 10px; padding: 12px 20px; }
.sw-wallet__balance { font: 18px/1.2 var(--sw-font-title); color: #5b3a12; }
.sw-wallet__count { display: block; font-size: 44px; color: #135c7e; }
.sw-wallet__spend p { margin: 0 0 8px; }
.sw-pack__price { font: bold 20px/1 Verdana, sans-serif; color: #5b3a12; margin: 4px 0; }
.sw-button:disabled { background: #9aa9b0; border-color: #7d8a90; cursor: not-allowed; }

/* --- Bandeau perso (ex include/top.php) ----------------------------------- */
.sw-header__avatar { max-width: 80px; max-height: 80px; }
.sw-bar { height: 5px; }
.sw-bar--life { background: url("/img/interface/hp.gif") repeat-x; }
.sw-bar--mana { background: url("/img/interface/mana.gif") repeat-x; }
/* Images de cadres découpés : pas d'espace de ligne en dessous (mode standards HTML5 des pages Laravel) */
img[src*="/design/cadres/"], img[src*="/design/calendar/"] { display: block; }

/* Formulaires des pages Laravel (mot de passe oublié...) */
.sw-panel--narrow { max-width: 520px; }
.sw-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.sw-form__label { font-weight: bold; margin-top: 6px; }
.sw-form__input { padding: 6px 8px; border: 1px solid #306d96; border-radius: 4px; font-size: 14px; background: #fff; }
.sw-form__input:focus-visible { outline: 2px solid #135c7e; outline-offset: 1px; }
.sw-form__error { margin: 0; color: #bf0000; font-weight: bold; }
.sw-form .sw-button { align-self: flex-start; margin-top: 10px; }

/* Inscription */
.sw-register { max-width: 860px; }
.sw-register__form { display: flex; flex-direction: column; gap: 16px; }
.sw-register__step { margin: 0; padding: 12px 16px 16px; border: 1px solid #d3a24a; border-radius: 10px; background: #fff8e6; }
.sw-register__step legend { padding: 0 8px; font: 20px/1.2 var(--sw-font-title); color: #5a3a0c; }
.sw-register__field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; flex: 1; }
.sw-register__field > label, .sw-register__label { font-weight: bold; }
.sw-register__row { display: flex; flex-wrap: wrap; gap: 16px; }
.sw-register__help { margin: 2px 0 0; font-size: 12px; color: #555; }
.sw-register__sexe { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.sw-register__chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid #306d96;
    border-radius: 16px; background: #fff; cursor: pointer; }
.sw-register__chip:has(input:checked) { background: #306d96; color: #fff; }
.sw-register__races { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.sw-race { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px;
    border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; }
.sw-race input { position: absolute; opacity: 0; }
.sw-race:hover { border-color: #d3a24a; }
.sw-race:has(input:checked), .sw-race--selected { border-color: #306d96; box-shadow: 0 0 0 2px #306d96 inset; }
.sw-race:has(input:focus-visible) { outline: 2px solid #135c7e; outline-offset: 2px; }
.sw-race__img { width: 100%; max-width: 100px; height: auto; border-radius: 4px; }
.sw-race__name { font: 15px/1.2 var(--sw-font-title); color: #5a3a0c; }
.sw-race__details { margin-top: 12px; padding: 10px 12px; border-left: 4px solid #306d96; background: #fff; }
.sw-race__details h3 { margin: 0 0 6px; font: 18px/1.2 var(--sw-font-title); color: #306d96; }
.sw-race__description { white-space: pre-line; margin: 0 0 6px; }
.sw-register__stats { max-width: 480px; }
.sw-register__stats td, .sw-register__stats th { text-align: center; }
.sw-register__stats th[scope="row"] { text-align: left; }
.sw-register__stepper { display: inline-flex; align-items: center; gap: 4px; }
.sw-register__stepper button { width: 26px; height: 26px; border: 1px solid #306d96; border-radius: 50%; background: #fff;
    color: #306d96; font-weight: bold; cursor: pointer; }
.sw-register__stepper button:disabled { opacity: .35; cursor: default; }
.sw-register__points { width: 52px; text-align: center; }
.sw-register__remaining { font-size: 14px; }
.sw-register__remaining--error { color: #bf0000; }
.sw-register__check { display: flex; align-items: center; gap: 8px; font-weight: bold; cursor: pointer; }
.sw-register__submit { align-self: flex-start; font-size: 16px; padding: 8px 20px; }
.sw-flash ul { margin: 6px 0 0 18px; padding: 0; }

/* --- Bandeau du haut en flex (ex tables de include/top.php) ---------------- */
.sw-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sw-header__logo, .sw-header__clock { flex: 0 0 auto; }
.sw-header__center { display: flex; flex-direction: column; align-items: center; padding-left: 25px; }
.sw-header__menu { display: flex; justify-content: center; }

/* Fiche perso dans son cadre parchemin (image assemblée depuis top_cadre_01..05) */
.sw-perso-card {
    position: relative;
    display: flex;
    width: 360px;
    height: 140px;
    box-sizing: border-box;
    padding: 18px 41px 31px 20px;
    background: url("/assets/ui/img/frames/perso-card.png") no-repeat;
}
.sw-perso-card__avatar { flex: 0 0 80px; height: 80px; display: flex; justify-content: center; align-items: flex-start; }
.sw-perso-card__stats { flex: 0 0 141px; margin: 0; }
.sw-perso-card__gauge, .sw-perso-card__line { display: flex; align-items: flex-start; }
.sw-perso-card__stats dt { flex: 0 0 25px; }
.sw-perso-card__stats dd { flex: 1; margin: 0; }
.sw-perso-card__line dd { line-height: 15px; }
.sw-perso-card__value { display: block; text-align: right; }
.sw-perso-card__xp { flex: 0 0 72px; display: flex; justify-content: center; align-items: flex-start; }
.sw-perso-card__effects { position: absolute; left: 20px; top: 98px; display: flex; gap: 2px; }

/* --- Menu de gauche en flex (ex tables de include/menu.php) ---------------- */
.sw-side-menu { width: 175px; display: flex; flex-direction: column; gap: 30px; }
.sw-side-menu__closed { margin: 0; }

/* Cadre jaune : image assemblée depuis cadre_jaune_01..09, étirée par border-image */
.sw-frame-yellow {
    box-sizing: border-box;
    width: 175px;
    min-height: 101px;
    border-style: solid;
    border-width: 23px 40px 28px 28px;
    border-image: url("/assets/ui/img/frames/yellow.png") 23 40 28 28 fill stretch;
}
.sw-side-menu__login { margin: 0 0 15px; }
.sw-side-menu__form { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-bottom: 4px; }
.sw-side-menu__form .input { width: 76px; box-sizing: border-box; }
.sw-side-menu__submit { width: auto !important; margin-top: 12px; }
.sw-side-menu__links { margin: 0; padding: 0; list-style: none; }
.sw-side-menu__gap { margin-top: 15px; }
.sw-side-menu__admin { margin-top: 6px; padding-top: 6px; border-top: 1px solid #000; }

/* Calendrier */
.sw-calendar { width: 150px; }
.sw-calendar__title {
    box-sizing: border-box;
    height: 25px;
    margin: 0;
    padding: 7px 7px 0;
    background: url("/assets/ui/img/frames/calendar-title.png") no-repeat;
    font-weight: normal;
    line-height: 18px;
    white-space: nowrap;
}
.sw-calendar__days { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; text-align: center; }
.sw-calendar__days li { line-height: 14px; }
.sw-calendar__today { background: #005879; color: #fff; border-radius: 3px; }

/* --- Page d'accueil en flex (ex tables de home.php / news.php / sondage.php) */
.sw-home { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sw-home__splash { max-width: 100%; height: auto; }
.sw-home__columns { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px; max-width: 1100px; }

/* Parchemin (cadre_parch_01..05) et cadre des news (cadre_news_01..09), étirés en hauteur par border-image */
.sw-frame-parchment {
    box-sizing: border-box;
    width: 360px;
    min-height: 388px;
    border-style: solid;
    border-width: 48px 56px 45px 40px;
    border-image: url("/assets/ui/img/frames/parchment.png") 48 56 45 40 fill stretch;
}
.sw-frame-news {
    box-sizing: border-box;
    width: 400px;
    min-height: 180px;
    border-style: solid;
    border-width: 51px 12px 31px 18px;
    border-image: url("/assets/ui/img/frames/news.png") 51 12 31 18 fill stretch;
}
.sw-home__welcome p { margin: 0 0 8px; }
.sw-home__cta { margin-top: 14px !important; text-align: center; }
.sw-home__news-item { margin-bottom: 14px; }
.sw-home__news-item .date { margin: 0; }
.sw-home__poll { width: auto; min-width: 175px; max-width: 260px; margin-top: 14px; }
.sw-home__poll-title { margin: 0 0 6px; }
.sw-home__poll-form { display: flex; flex-direction: column; gap: 3px; }
.sw-home__poll-form label { cursor: pointer; }
.sw-home__poll-submit { align-self: center; margin-top: 6px; }
.sw-home__poll-form .default, .sw-home__poll-form .whitelink { align-self: center; text-align: center; }
.sw-home__poll-results { border-collapse: collapse; }
.sw-home__poll-results td { padding: 1px 4px; }
.sw-home__cta .sw-button { text-decoration: none; display: inline-block; }

/* --- Page Statistiques ----------------------------------------------------- */
.sw-stats { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 8px 16px; }
.sw-stats__columns { align-self: stretch; }
.sw-stats__updated { margin: 0; }
.sw-stats__columns { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.sw-stats__column { display: flex; flex-direction: column; gap: 16px; flex: 1 1 240px; max-width: 320px; }
.sw-stats__table { width: 100%; }
.sw-stats__table td + td { text-align: right; white-space: nowrap; }

/* --- Encart « version legacy » en haut de l'accueil */
.sw-legacy-notice {
    box-sizing: border-box;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
    max-width: 776px;
    margin: 8px 0 10px;
    padding: 14px 20px;
    font: 13px/1.5 Verdana, Geneva, sans-serif;
    color: #4a3410;
    background: linear-gradient(#fbf1d0, #efdca6);
    border: 3px double #8a6420;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(60, 40, 10, .35), inset 0 0 20px rgba(138, 100, 32, .2);
}
.sw-legacy-notice__icon { font-size: 40px; line-height: 1; }
.sw-legacy-notice__title { margin: 0 0 6px; font: bold 17px Georgia, "Times New Roman", serif; color: #7a2e0c; }
.sw-legacy-notice p { margin: 0 0 6px; }
.sw-legacy-notice p:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
    .sw-legacy-notice { flex-direction: column; align-items: center; text-align: center; }
}
.sw-legacy-notice__discord { margin-top: 10px !important; padding-top: 8px; border-top: 1px dashed #b8914a; }
.sw-legacy-notice__discord-link { display: inline-block; margin-left: 6px; text-decoration: none; background: #5865f2; border-color: #4049b8; }
.sw-legacy-notice__discord-link:hover, .sw-legacy-notice__discord-link:focus-visible { background: #6f7bf7; }
/* Bouton Discord du menu de gauche (remplace le lien du forum « Place publique ») */
.sw-side-menu__discord { display: block; margin-top: 12px; padding: 5px 8px; text-align: center; font: bold 12px Verdana, sans-serif; color: #fff !important; text-decoration: none; background: #5865f2; border: 1px solid #4049b8; border-radius: 6px; }
.sw-side-menu__discord small { display: block; font-weight: normal; font-size: 10px; opacity: .85; }
.sw-side-menu__discord:hover, .sw-side-menu__discord:focus-visible { background: #6f7bf7; }

/* --- Marge à gauche : le logo et le menu ne collent plus au bord de la fenêtre --- */
.sw-header__logo { margin-left: 14px; }
.sw-side-menu { margin-left: 14px; }
.sw-side-menu__form .input { width: 100%; }

/* --- Encart de connexion sur l'accueil (visiteurs) ------------------------- */
.sw-home-login {
    box-sizing: border-box; width: 100%; max-width: 968px; margin: 10px 0 14px; padding: 14px 22px;
    background: #fbe5b6; border: 3px solid #5b3a12; border-radius: 12px; box-shadow: 4px 4px 0 rgba(0,0,0,.3);
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
}
.sw-home-login__title { margin: 0; font: bold 17px Georgia, "Times New Roman", serif; color: #7a2e0c; flex: 0 0 auto; }
.sw-home-login__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; flex: 1 1 420px; }
.sw-home-login__field { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; font-weight: bold; color: #5b3a12; }
.sw-home-login__field input { padding: 7px 9px; border: 1px solid #306d96; border-radius: 5px; font-size: 14px; background: #fff; }
.sw-home-login__field input:focus-visible { outline: 2px solid #135c7e; outline-offset: 1px; }
.sw-home-login__submit { font-size: 15px; padding: 8px 22px; }
.sw-home-login__links { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.sw-home-login__links a { color: #135c7e; font-weight: bold; }

/* --- Page clan (clan.php) : colonnes de cadres côte à côte, qui passent à la ligne --- */
.sw-clan { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.sw-clan__col { display: flex; flex-direction: column; gap: 8px; width: 350px; }
.sw-clan__col > table { width: 350px; }
/* Le contenu ne déborde plus des cadres (largeur utile ~ 310 px) */
.sw-clan td[width="314"] { width: 314px; max-width: 314px; }
.sw-clan td[width="314"] table { max-width: 310px; }
.sw-clan td[width="320"] { width: 306px; }
.sw-clan input[type="file"] { max-width: 200px; font-size: 11px; }
.sw-clan textarea, .sw-clan input[type="text"] { box-sizing: border-box; max-width: 290px; }
.sw-clan #Layer1 { max-width: 300px; }

/* ==========================================================================
   Responsive (« semblant de ») : cadre commun des pages (include/tophtml.php, layouts/game.blade.php)
   - Grand écran : inchangé (menu à gauche, contenu à droite).
   - Écran étroit : le menu passe au-dessus du contenu, en ligne ; le contenu prend toute la largeur
     et un tableau trop large défile dans sa zone au lieu d'élargir toute la page.
   ========================================================================== */
@media (max-width: 900px) {
    .sw-shell, .sw-shell > tbody, .sw-shell > tbody > tr, .sw-shell > tbody > tr > td { display: block; width: auto; height: auto; }
    /* 1re ligne vide des anciennes pages (tophtml.php) ; les pages Laravel n'ont qu'une ligne, celle du contenu */
    .sw-shell > tbody > tr:first-child:not(:has(.sw-shell__content)) { display: none; }
    .sw-shell__content { overflow-x: auto; padding: 0 6px 140px; }
    .sw-shell__content > img, .sw-shell__content > p img { max-width: 100%; height: auto; }

    /* Bandeau : les blocs passent à la ligne, centrés */
    .sw-header { flex-wrap: wrap; justify-content: center; }
    .sw-header__center { padding-left: 0; }

    /* Menu : cadre jaune en pleine largeur, liens en ligne, calendrier masqué */
    .sw-side-menu { width: auto; margin: 0 8px 10px; gap: 0; }
    .sw-side-menu .sw-frame-yellow { width: 100%; }
    .sw-side-menu__links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
    .sw-side-menu__gap { margin-top: 0; }
    .sw-side-menu__form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
    .sw-side-menu__form .input { width: 150px; }
    .sw-side-menu__submit { margin-top: 0; }
    .sw-side-menu__discord { display: inline-flex; gap: 6px; margin: 8px 0 0; }
    .sw-side-menu .sw-calendar { display: none; }

    /* Horloge : le disque soleil/lune est masqué, seule l'heure du jeu reste */
    .sw-header__clock { order: -1; width: 100%; display: flex; justify-content: center; }
    .sw-clock { height: 24px; background: none; }
    .sw-clock__window { display: none; }
    .sw-clock__box { top: 0; }
    .sw-header__logo { margin-left: 0; }

    /* Tableaux de mise en page qui juxtaposent des cadres (#Table_01) : les colonnes s'empilent */
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01),
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01) > tbody,
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01) > tbody > tr { display: block; width: auto !important; }
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01) > tbody > tr > td { display: block; width: auto !important; margin-bottom: 8px; }
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01) > tbody > tr > td:empty,
    .sw-shell__content table:has(> tbody > tr > td > table#Table_01) > tbody > tr > td[width="17"] { display: none; }
}

/* ==========================================================================
   Police des pages legacy agrandie (+2 px) : style.css / mep.css utilisaient 8 à 12 px, illisible sur
   les écrans actuels. Mêmes sélecteurs, chargés après : style.css et mep.css restent inchangés.
   ========================================================================== */
.default { font-size: 12px; }  /* était style.css : 10px */
.text { font-size: 13px; }  /* était style.css : 11px */
.textlogin { font-size: 12px; }  /* était style.css : 10px */
.textgras { font-size: 13px; }  /* était style.css : 11px */
.textmoyengras { font-size: 14px; }  /* était style.css : 12px */
.date { font-size: 12px; }  /* était style.css : 10px */
.newstitre { font-size: 12px; }  /* était style.css : 10px */
.newstext { font-size: 12px; }  /* était style.css : 10px */
.bouton { font-size: 12px; }  /* était style.css : 10px */
.menutext { font-size: 12px; }  /* était style.css : 10px */
.menutext a:active, .menutext a:visited, .menutext a:link { font-size: 12px; }  /* était style.css : 10px */
.whiteText { font-size: 11px; }  /* était style.css : 9px */
.whiteText a:active, .whiteText a:visited, .whiteText a:link { font-size: 11px; }  /* était style.css : 9px */
.whiteText a:hover { font-size: 11px; }  /* était style.css : 9px */
.darkText { font-size: 12px; }  /* était style.css : 10px */
.darkText a:active, .darkText a:visited, .darkText a:link { font-size: 12px; }  /* était style.css : 10px */
.darkText a:hover { font-size: 12px; }  /* était style.css : 10px */
.tableCadre1 { font-size: 12px; }  /* était style.css : 10px */
.tableCadre2 { font-size: 12px; }  /* était style.css : 10px */
.inputButton { font-size: 11px; }  /* était style.css : 9px */
.tableCadre3 { font-size: 12px; }  /* était style.css : 10px */
.attackLog1 { font-size: 12px; }  /* était style.css : 10px */
.attackLog2 { font-size: 12px; }  /* était style.css : 10px */
.MessageUnread { font-size: 11px; }  /* était style.css : 9px */
.MessageReaded { font-size: 11px; }  /* était style.css : 9px */
.MessageSelection { font-size: 11px; }  /* était style.css : 9px */
.input { font-size: 14px; }  /* était style.css : 12px */
.mypersoInput { font-size: 11px; }  /* était style.css : 9px */
.contourTable1 { font-size: 12px; }  /* était style.css : 10px */
.miniText { font-size: 11px; }  /* était style.css : 9px */
.tabClan { font-size: 11px; }  /* était style.css : 9px */
.contourTable2 { font-size: 12px; }  /* était style.css : 10px */
#navcontainer ul li a { font-size: 13px; }  /* était style.css : 11px */
.tablebleu { font-size: 12px; }  /* était style.css : 10px */
.tablebleu th { font-size: 13px; }  /* était style.css : 11px */
.tablenobg { font-size: 12px; }  /* était style.css : 10px */
.tablenobg th { font-size: 13px; }  /* était style.css : 11px */
.tablejaune { font-size: 12px; }  /* était style.css : 10px */
.tablejaune th { font-size: 13px; }  /* était style.css : 11px */
.tablebleuc { font-size: 12px; }  /* était style.css : 10px */
.tablebleuc th { font-size: 13px; }  /* était style.css : 11px */
#lignebleu td { font-size: 12px; }  /* était style.css : 10px */
.input2 { font-size: 12px; }  /* était style.css : 10px */
.miniText2 { font-size: 10px; }  /* était style.css : 8px */
.tablejaunen { font-size: 12px; }  /* était style.css : 10px */
#stats { font-size: 11px; }  /* était mep.css : 9px */
.miniText { font-size: 11px; }  /* était mep.css : 9px */

/* Icônes du menu reprises dans les anciens textes (tutoriel : « La planète (icône) sert à... ») */
img[src^="/assets/ui/img/menu/"]:not(.sw-menu__up):not(.sw-menu__over) { height: 22px; width: auto; vertical-align: middle; }
