/* ===========================================================================
   tc2026.css - Habillage moderne de The Chien (novembre 2026)

   Principe : on garde la structure historique des pages (tableaux, couleurs,
   illustrations) pour que les joueurs retrouvent leur site, et on modernise
   le rendu : typographie, cartes arrondies, boutons, en-tete, mobile.
   Feuille chargee automatiquement sur toutes les pages (compat_php8.php).
   =========================================================================== */

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/fredoka-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/fredoka-latin-600-normal.woff2) format("woff2"); }

:root {
    --tc-creme: #FFECCE;
    --tc-creme-2: #FFF4E2;
    --tc-carte: #FFFCF3;
    --tc-bord: #F1D9B2;
    --tc-magenta: #C03284;
    --tc-magenta-f: #9E1F6A;
    --tc-violet: #660099;
    --tc-bleu: #0066CC;
    --tc-vert: #2F8F2F;
    --tc-rouge: #B3122E;
    --tc-or: #F5B301;
    --tc-texte: #3B2A32;
    --tc-doux: #7B6670;
    --tc-ombre: 0 6px 18px rgba(120, 70, 40, .13);
    --tc-ombre-f: 0 10px 30px rgba(102, 0, 153, .22);
    --tc-r: 18px;
    --tc-police: "Nunito", "Segoe UI", Arial, Helvetica, sans-serif;
    --tc-titre: "Fredoka", "Nunito", Arial, sans-serif;
}

/* --- Base ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.tc {
    margin: 0;
    color: var(--tc-texte);
    font-family: var(--tc-police);
    background-color: var(--tc-creme) !important;
    background-image:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 32%),
        radial-gradient(circle at 88% 92%, rgba(192,50,132,.07) 0, rgba(192,50,132,0) 35%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23E9C99A' fill-opacity='.28'%3E%3Cellipse cx='30' cy='34' rx='7' ry='9'/%3E%3Cellipse cx='44' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='58' cy='30' rx='6' ry='8'/%3E%3Cellipse cx='66' cy='44' rx='6' ry='7'/%3E%3Cpath d='M40 42c8-4 20 2 22 12 2 9-6 13-14 11-8 2-17-1-16-10 1-6 4-10 8-13z'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    line-height: 1.45;
}
body.tc font[face] { font-family: inherit; }
body.tc a { color: var(--tc-magenta-f); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s; }
body.tc a:hover { color: var(--tc-violet); }
body.tc a img { border: 0; }
body.tc h1, body.tc h2, body.tc h3 { font-family: var(--tc-titre); font-weight: 600; letter-spacing: .2px; }
body.tc ::selection { background: rgba(192, 50, 132, .2); }

/* --- Cadre principal : la grande carte creme des pages du jeu --------------- */
body.tc table[width="900"], body.tc table[width="920"], body.tc table[width="960"] {
    width: 100%;
    max-width: 960px;
    margin: 14px auto 28px;
    background-color: #FFF1DB !important;
    background-image: linear-gradient(180deg, #FFF6E9 0, #FFEFD6 100%);
    border-radius: 26px;
    box-shadow: 0 14px 40px rgba(120, 70, 40, .16), inset 0 0 0 1px rgba(255,255,255,.7);
    border-spacing: 0;
    padding: 0 10px 14px;
}
/* Blocs de contenu (tableaux colores) : cartes arrondies */
body.tc table[bgcolor]:not([width="900"]):not([width="920"]):not([width="960"]):not(.tc-brut) {
    background-color: var(--tc-carte) !important;
    border: 1px solid var(--tc-bord);
    border-radius: var(--tc-r);
    box-shadow: var(--tc-ombre);
    border-collapse: separate;
    overflow: hidden;
}
body.tc table[bgcolor] table[bgcolor] { box-shadow: none; }
body.tc table[bgcolor="#FFFFCC"], body.tc table[bgcolor="#ffffcc"] { background-color: #FFFDF0 !important; }
body.tc table[bgcolor="#FFEDCC"], body.tc table[bgcolor="#FFEDCC"] { background-color: #FFF8EC !important; }
body.tc td[bgcolor="#FFFFE8"] { background-color: #FFFDF4 !important; }
body.tc table[width="750"], body.tc table[width="870"], body.tc table[width="700"], body.tc table[width="780"] { margin-left: auto; margin-right: auto; }
body.tc table[width="750"] > tbody > tr > td, body.tc table[width="870"] > tbody > tr > td { padding: 8px; }

/* Texte historique : un peu plus grand et plus lisible */
body.tc .Style20, body.tc font[size="2"] { font-size: 14px; }
body.tc p { margin: .55em 0; }
body.tc hr { border: 0; border-top: 1px solid var(--tc-bord); }

/* Les vieilles images gardent leur nettete mais s'arrondissent un peu */
body.tc table[bgcolor] img[width="300"], body.tc table[bgcolor] img[width="200"], body.tc img[width="700"] { border-radius: 14px; }

/* --- Boutons et champs ------------------------------------------------------ */
body.tc input[type="submit"], body.tc input[type="button"], body.tc button:not(.tc-nu), body.tc .tc-bouton {
    font-family: var(--tc-police);
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(180deg, #D8479B 0, var(--tc-magenta) 55%, #A6246F 100%);
    border: 0;
    border-radius: 999px;
    padding: 9px 18px;
    min-height: 38px;
    box-shadow: 0 3px 0 #7E1752, 0 6px 14px rgba(158, 31, 106, .28);
    cursor: pointer;
    transition: transform .08s, box-shadow .08s, filter .15s;
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
}
body.tc input[type="submit"]:hover, body.tc input[type="button"]:hover, body.tc button:not(.tc-nu):hover, body.tc .tc-bouton:hover { filter: brightness(1.07); color: #fff; }
body.tc input[type="submit"]:active, body.tc input[type="button"]:active, body.tc button:not(.tc-nu):active, body.tc .tc-bouton:active { transform: translateY(2px); box-shadow: 0 1px 0 #7E1752, 0 3px 8px rgba(158,31,106,.25); }
body.tc input[type="submit"]:disabled, body.tc button:disabled { filter: grayscale(.7) opacity(.6); cursor: default; }
body.tc .tc-bouton-violet, body.tc button.tc-bouton-violet:not(.tc-nu) { background: linear-gradient(180deg, #8A2BC0 0, var(--tc-violet) 100%); box-shadow: 0 3px 0 #430066, 0 6px 14px rgba(102,0,153,.28); }
body.tc .tc-bouton-vert, body.tc button.tc-bouton-vert:not(.tc-nu) { background: linear-gradient(180deg, #45B145 0, var(--tc-vert) 100%); box-shadow: 0 3px 0 #1D5E1D, 0 6px 14px rgba(47,143,47,.28); }
body.tc .tc-bouton-gris, body.tc button.tc-bouton-gris:not(.tc-nu) { background: linear-gradient(180deg, #A79AA0 0, #857880 100%); box-shadow: 0 3px 0 #5F555A; }
body.tc input[type="text"], body.tc input[type="password"], body.tc input[type="email"], body.tc input[type="number"], body.tc select, body.tc textarea {
    font-family: var(--tc-police);
    font-size: 15px;
    color: var(--tc-texte);
    background: #fff;
    border: 2px solid #EBCFA5;
    border-radius: 12px;
    padding: 7px 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    max-width: 100%;
}
body.tc input[type="text"]:focus, body.tc input[type="password"]:focus, body.tc input[type="email"]:focus, body.tc input[type="number"]:focus, body.tc select:focus, body.tc textarea:focus {
    border-color: var(--tc-magenta);
    box-shadow: 0 0 0 4px rgba(192, 50, 132, .15);
}
body.tc input[type="radio"], body.tc input[type="checkbox"] { accent-color: var(--tc-magenta); width: 17px; height: 17px; vertical-align: middle; }

/* --- En-tete du jeu (main.php) --------------------------------------------- */
.tc-entete { max-width: 940px; margin: 0 auto; padding: 10px 2px 4px; text-align: left; }
.tc-barre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; margin-right: auto; }
.tc-logo img { height: 46px; width: auto; display: block; }
.tc-logo-texte { font-family: var(--tc-titre); font-weight: 600; font-size: 27px; line-height: 1; color: var(--tc-violet);
    background: linear-gradient(90deg, var(--tc-magenta), var(--tc-violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tc-logo-patte { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #FFB347, #F07C1E); box-shadow: 0 3px 8px rgba(240,124,30,.4); display: inline-flex; align-items: center; justify-content: center; }
.tc-logo-patte svg { width: 24px; height: 24px; fill: #fff; }
.tc-joueur { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tc-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--tc-bord); border-radius: 999px; padding: 4px 11px 4px 5px;
    box-shadow: 0 2px 6px rgba(120,70,40,.08); font-size: 13px; color: var(--tc-doux); white-space: nowrap; text-decoration: none !important; }
.tc-chip b { color: var(--tc-texte); font-size: 15px; font-weight: 800; }
.tc-chip small { font-size: 12px; }
.tc-chip i { width: 24px; height: 24px; border-radius: 50%; display: inline-block; background-size: 16px 16px; background-position: center; background-repeat: no-repeat; }
.tc-chip-chien { padding-left: 4px; color: var(--tc-violet) !important; font-weight: 800; }
.tc-chip-chien img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; background: #FFF4E2; border: 2px solid #F3C98C; }
.tc-chip-chien { position: relative; }
.tc-chip-tresor { position: absolute; left: 20px; top: -5px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #FFF6D8; border: 1.5px solid #E0A21C; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tc-chip-tresor svg { width: 12px; height: 12px; display: block; }
.tc-i-doggy { background-color: #FFE8A3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23F5B301' stroke='%23B07C00' stroke-width='1.5'/%3E%3Cpath d='M8 9.5a1.6 1.6 0 1 1 2.4-1.3l3.2 3.2a1.6 1.6 0 1 1 1.3 2.4 1.6 1.6 0 1 1-2.4 1.3l-3.2-3.2A1.6 1.6 0 1 1 8 9.5z' fill='%23fff'/%3E%3C/svg%3E"); }
.tc-i-point { background-color: #E7D7FF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.2 1.3-6.6L2.5 9.3l6.6-.8z' fill='%23660099'/%3E%3C/svg%3E"); }
.tc-i-bp { background-color: #DCEBFF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.5 3l6.5-.5-.5 6.5-9 9-2-2 9-9-1.5-.5zM4 16l4 4-2 2-1.5-1.5L2 22l-.5-.5L4 19 2.5 17.5z' fill='%230066CC'/%3E%3C/svg%3E"); }
/* v12 : deconnexion = petite icone ronde, sur la meme ligne que les compteurs */
.tc-quitter { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #A08A98 !important; text-decoration: none !important; border: 1px solid var(--tc-bord); background: rgba(255,255,255,.75); transition: color .15s, border-color .15s, transform .15s; }
.tc-quitter svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.tc-quitter:hover { color: var(--tc-rouge) !important; border-color: var(--tc-rouge); transform: scale(1.06); }
/* v16 : interrupteur Mode admin (comptes administrateurs) */
.tc-admin { flex: none; display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.tc-admin button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; background: #EFE6F2; border: 1px solid #D9C6E0; cursor: pointer; font: 800 12px/1 Nunito, Arial, sans-serif; color: #5A3D66; }
.tc-admin-glis { position: relative; width: 30px; height: 18px; border-radius: 999px; background: #C9B7CF; transition: background .2s; }
.tc-admin-glis i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.tc-admin.on button { background: #2B1D33; border-color: #2B1D33; color: #FFD34D; box-shadow: 0 0 0 3px rgba(255,211,77,.35); }
.tc-admin.on .tc-admin-glis { background: #F5B301; }
.tc-admin.on .tc-admin-glis i { transform: translateX(12px); }
.tc-admin-lien { display: inline-flex; align-items: center; gap: 4px; text-decoration: none !important; font-size: 15px; line-height: 1; padding: 4px 9px 4px 6px; border-radius: 999px; background: #EAF2FF; border: 1px solid #BFD3F2; }
.tc-admin-lien span { font: 800 12px/1 Nunito, Arial, sans-serif; color: #2F4F8F; }
.tc-admin-lien:hover { background: #DCE9FF; }
@media (max-width: 1100px) { .tc-admin-lien span { display: none; } .tc-admin-lien { padding: 4px; } }
@media (max-width: 720px) { .tc-admin-lib { display: none; } .tc-admin button { padding: 4px; } }

@media screen and (min-width: 761px) {
    .tc-barre { flex-wrap: nowrap; gap: 8px; }
    .tc-joueur { flex-wrap: nowrap; min-width: 0; }
    .tc-logo img { height: 42px; }
    /* v18 : les compteurs ne se compriment plus (ils se chevauchaient avec Missions quand la barre etait pleine) */
    .tc-joueur > .tc-chip { flex: none; }
    .tc-barre:has(.tc-admin) .tc-chip small, .tc-barre:has(.tc-admin) .ms-lib { display: none; }
    .tc-barre:has(.tc-admin) .tc-logo img { height: 36px; }
}
@media screen and (min-width: 761px) and (max-width: 1100px) {
    .tc-chip small { display: none; }
    .tc-barre { flex-wrap: wrap; row-gap: 6px; }
}

.tc-menu { display: flex; justify-content: center; flex-wrap: nowrap; gap: 2px; margin: 10px 0 2px; padding: 6px 4px 4px;
    background: rgba(255,255,255,.55); border-radius: 20px; border: 1px solid rgba(241,217,178,.8); }
.tc-mi { position: relative; display: flex; flex-direction: column; align-items: center; width: 72px; min-width: 64px; padding: 3px 0 4px; border-radius: 14px; text-decoration: none !important; transition: transform .15s, background .15s; }
.tc-mi img { width: 60px; height: 60px; display: block; transition: transform .18s; filter: drop-shadow(0 3px 3px rgba(80,40,20,.18)); }
.tc-mi img.tc-mi-ancien { width: 64px; height: 70px; }
.tc-mi span { font-family: var(--tc-titre); font-weight: 600; font-size: 13px; color: var(--tc-texte); margin-top: 1px; white-space: nowrap; }
.tc-mi:hover { background: rgba(255, 255, 255, .9); }
.tc-mi:hover img { transform: translateY(-3px) rotate(-3deg) scale(1.06); }
.tc-mi.actif { background: #fff; box-shadow: 0 4px 12px rgba(192,50,132,.18); }
.tc-mi.actif span { color: var(--tc-magenta); }
.tc-mi.actif::after { content: ""; position: absolute; bottom: -1px; left: 26%; right: 26%; height: 3px; border-radius: 3px; background: var(--tc-magenta); }
.tc-mi .tc-pastille { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--tc-rouge); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.tc-mi-nouveau::before { content: "NOUVEAU"; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); font-size: 8.5px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--tc-vert); padding: 1px 5px; border-radius: 6px; z-index: 2; }

/* --- Publicite : espace reserve discret ------------------------------------ */
.tc-pub { margin: 8px auto 0; }

/* --- Popins (fenetres de confirmation et de resultat) ----------------------- */
.tc-voile { position: fixed; inset: 0; background: rgba(40, 10, 40, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 16px; opacity: 0; transition: opacity .2s; }
.tc-voile.ouvert { opacity: 1; }
.tc-popin { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 26px; box-shadow: 0 24px 60px rgba(60, 0, 60, .35); text-align: center; padding: 26px 24px 22px; transform: translateY(16px) scale(.96); transition: transform .25s cubic-bezier(.2,1.4,.4,1); font-family: var(--tc-police); color: var(--tc-texte); overflow: hidden; }
.tc-voile.ouvert .tc-popin { transform: none; }
.tc-popin::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 96px; background: linear-gradient(135deg, #FFE6F3, #F0E2FF); z-index: 0; }
.tc-popin > * { position: relative; z-index: 1; }
.tc-popin-illu { width: 112px; height: 112px; margin: -6px auto 6px; display: flex; align-items: center; justify-content: center; }
.tc-popin-illu img, .tc-popin-illu svg { max-width: 112px; max-height: 112px; }
.tc-popin h3 { margin: 4px 0 6px; font-family: var(--tc-titre); font-size: 23px; font-weight: 600; color: var(--tc-violet); }
.tc-popin p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.5; text-wrap: balance; }
.tc-popin h3 { text-wrap: balance; }
.tc-popin .tc-doux { display: block; margin-top: 6px; font-size: 14px; color: var(--tc-doux); }
.tc-popin .tc-gains { display: flex; justify-content: center; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.tc-popin .tc-gain { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 17px; animation: tc-pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.tc-popin .tc-gain-d { background: #FFF2C7; color: #8A5A00; }
.tc-popin .tc-gain-p { background: #EFE3FF; color: var(--tc-violet); animation-delay: .12s; }
.tc-popin .tc-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.tc-popin .tc-fermer { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.8); color: var(--tc-doux); font-size: 20px; line-height: 32px; cursor: pointer; z-index: 2; padding: 0; box-shadow: none; min-height: 0; }
.tc-popin-gain::before { background: linear-gradient(135deg, #FFF0B8, #FFD9EE); }
.tc-popin-perte::before { background: linear-gradient(135deg, #E9E4EE, #F5E9E0); }
.tc-popin-lettre::before { background: linear-gradient(135deg, #FFE7B0, #E6D3FF); }
.tc-popin-erreur::before { background: linear-gradient(135deg, #FFE0E0, #FFF0E0); }
.tc-popin-magiktel::before { background: linear-gradient(135deg, #FFF0B8, #FFE0F0); }
.tc-popin-magiktel .tc-popin-illu img { animation: tc-mt-saut 1.6s ease-in-out infinite; }
@keyframes tc-mt-saut { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }

/* v15 : carte de message des pages de resultat (confirmation, refus, erreur) */
.tc-msg { display: flex; align-items: center; gap: 22px; max-width: 620px; margin: 26px auto; padding: 22px 26px; border-radius: 24px; text-align: left;
  background: #fff; border: 2px solid #F3E2C8; box-shadow: 0 10px 28px rgba(120, 70, 30, .10); font-family: var(--tc-police); color: var(--tc-texte); position: relative; overflow: hidden;
  animation: tc-msg-entree .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.tc-msg::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: #C03284; }
.tc-msg-ok::before, .tc-msg-gain::before { background: #2E9A47; }
.tc-msg-refus::before, .tc-msg-erreur::before { background: #D7263D; }
.tc-msg-info::before { background: #F5B301; }
.tc-msg-trophee::before, .tc-msg-lettre::before { background: linear-gradient(#F5B301, #C03284); }
.tc-msg-ok, .tc-msg-gain { background: linear-gradient(135deg, #FFFFFF 40%, #EEFAEC); }
.tc-msg-refus, .tc-msg-erreur { background: linear-gradient(135deg, #FFFFFF 40%, #FFF0F2); }
.tc-msg-info, .tc-msg-question { background: linear-gradient(135deg, #FFFFFF 40%, #FFF8E1); }
.tc-msg-illu { flex: 0 0 104px; }
.tc-msg-illu img { width: 104px; height: 104px; object-fit: contain; display: block; animation: tc-mt-saut 2.4s ease-in-out infinite; }
.tc-msg-corps { flex: 1; min-width: 0; }
.tc-msg h2 { margin: 0 0 6px; font-family: var(--tc-titre); font-size: 24px; font-weight: 600; line-height: 1.15; color: var(--tc-violet); text-wrap: balance; }
.tc-msg p { margin: 0; font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.tc-msg .tc-doux { display: block; margin-top: 6px; font-size: 14px; color: var(--tc-doux); }
.tc-msg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tc-msg-actions .tc-bouton { text-decoration: none; }
@keyframes tc-msg-entree { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .tc-msg { flex-direction: column; text-align: center; gap: 10px; margin: 16px 10px; padding: 18px 16px 20px; }
  .tc-msg::before { inset: 0 0 auto 0; width: auto; height: 6px; }
  .tc-msg-illu { flex-basis: auto; }
  .tc-msg-illu img { width: 88px; height: 88px; }
  .tc-msg h2 { font-size: 21px; }
  .tc-msg-actions { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .tc-msg, .tc-msg-illu img, .tc-popin-magiktel .tc-popin-illu img { animation: none; } }
.tc-confettis { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.tc-confettis i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: tc-tombe 1.6s ease-in forwards; }
@keyframes tc-tombe { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@keyframes tc-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.tc-lettre-geante { font-family: var(--tc-titre); font-size: 66px; font-weight: 600; color: var(--tc-violet); line-height: 1; text-shadow: 0 4px 0 #F3C98C; animation: tc-pop .6s cubic-bezier(.2,1.6,.4,1) both; }

/* Notification breve (redirections automatiques) */
.tc-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #2F1A2B; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 9998; display: flex; gap: 12px; align-items: center; }
.tc-toast a { color: #FFD3EC !important; font-weight: 800; }

/* --- Carte cliquable de la ville ------------------------------------------- */
.tc-ville { position: relative; display: inline-block; max-width: 100%; line-height: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--tc-ombre); }
.tc-ville img { max-width: 100%; height: auto; display: block; }
.tc-ville-zone { position: absolute; transform: translate(-50%, -50%); line-height: 1.2; background: rgba(255,255,255,.92); color: var(--tc-violet) !important; font-family: var(--tc-titre); font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; box-shadow: 0 3px 10px rgba(0,0,0,.25); text-decoration: none !important; white-space: nowrap; opacity: .0; transition: opacity .2s, transform .2s; pointer-events: none; }
.tc-ville:hover .tc-ville-zone, .tc-ville.tc-tactile .tc-ville-zone { opacity: .95; }
.tc-ville-zone.chaud { background: var(--tc-magenta); color: #fff !important; transform: translate(-50%, -60%) scale(1.08); opacity: 1; }

/* --- Utilitaires ----------------------------------------------------------- */
.tc-carte { background: var(--tc-carte); border: 1px solid var(--tc-bord); border-radius: var(--tc-r); box-shadow: var(--tc-ombre); padding: 16px; }
.tc-titre { font-family: var(--tc-titre); font-weight: 600; color: var(--tc-violet); }
.tc-centre { text-align: center; }
.tc-masque { display: none !important; }

/* ===========================================================================
   MOBILE ET TABLETTE (jusqu'a 820 px)
   =========================================================================== */
/* Largeurs intermediaires (821 a 960 px) : le cadre ne doit jamais deborder de l'ecran */
@media screen and (max-width: 960px) {
    body.tc table[width="900"], body.tc table[width="920"], body.tc table[width="960"] { width: 100% !important; table-layout: fixed; }
    body.tc-p-tchat table[width="900"] { width: 100% !important; table-layout: fixed; }
    .tc-menu { overflow-x: auto; overflow-y: hidden; justify-content: center; justify-content: safe center; scrollbar-width: thin; }
    .tc-mi { width: 66px; min-width: 60px; }
    .tc-mi img { width: 54px; height: 54px; }
}
@media screen and (max-width: 820px) {
    body.tc { overflow-x: hidden; background-attachment: scroll; }
    body.tc img, body.tc table, body.tc iframe, body.tc object, body.tc embed, body.tc video { max-width: 100% !important; }
    body.tc img { height: auto !important; }
    body.tc .tc-mi img, body.tc .tc-chip img { height: auto !important; }
    body.tc .tc-logo img { height: 36px !important; width: auto !important; }
    body.tc table { max-width: 100% !important; }
    body.tc table[width="900"], body.tc table[width="920"], body.tc table[width="960"] { margin: 0 auto 16px; border-radius: 0 0 22px 22px; padding: 0 6px 10px; width: 100% !important; table-layout: fixed; }
    body.tc table[width="850"], body.tc table[width="800"], body.tc table[width="780"], body.tc table[width="750"], body.tc table[width="870"], body.tc table[width="700"],
    body.tc table[width="666"], body.tc table[width="650"], body.tc table[width="600"], body.tc table[width="580"], body.tc table[width="550"], body.tc table[width="500"],
    body.tc table[width="480"], body.tc table[width="450"], body.tc table[width="400"], body.tc table[width="725"], body.tc table[width="720"],
    body.tc table[width="730"], body.tc table[width="727"], body.tc table[width="808"], body.tc table[width="643"], body.tc table[width="601"], body.tc table[width="362"] { width: 100% !important; }
    /* Inscription : colonnes decoratives masquees et champs pleine largeur */
    body.tc-p-register td[width] { width: auto !important; }
    body.tc-p-register table table td { display: block; text-align: center !important; }
    body.tc-p-register table table td > div[align="right"], body.tc-p-register table table td[align="right"] { text-align: center !important; }
    body.tc-p-register table[width="725"] img[width="180"], body.tc-p-register table[width="725"] td[rowspan] > img, body.tc-p-register .tc-deco-mobile { display: none; }
    body.tc-p-register input[type="text"], body.tc-p-register input[type="password"], body.tc-p-register input[type="email"], body.tc-p-register select { max-width: 100%; box-sizing: border-box; display: block; margin-left: auto; margin-right: auto; }
    body.tc td[width], body.tc th[width] { width: auto !important; min-width: 0 !important; }
    body.tc td, body.tc th { word-wrap: break-word; overflow-wrap: break-word; }
    /* Les contenus en colonnes se superposent */
    body.tc table[bgcolor] > tbody > tr > td { display: block; width: auto !important; }
    body.tc table[bgcolor] > tbody > tr > td[colspan] { display: block; }
    body.tc table[bgcolor][width] { table-layout: fixed; }   /* v22 : les colonnes empilees ne poussent plus la page (niveau 7) */
    body.tc table.tc-grille-garder > tbody > tr > td { display: table-cell; }
    body, td, th, p, li, div, span, a, font { line-height: 1.5; }
    body.tc .Style20, body.tc font[size="2"], body.tc font[size="1"], body.tc p, body.tc td { font-size: 15px; }
    body.tc input[type="text"], body.tc input[type="password"], body.tc input[type="email"], body.tc input[type="number"], body.tc select, body.tc textarea { font-size: 16px !important; padding: 9px 11px !important; }
    body.tc input[type="submit"], body.tc input[type="button"], body.tc button:not(.tc-nu) { font-size: 15.5px; min-height: 44px; padding: 10px 18px; }

    .tc-entete { padding: 8px 4px 2px; position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, #FFF6E9 0, #FFF1DB 85%, rgba(255,241,219,0) 100%); }
    .tc-barre { gap: 6px; }
    .tc-logo img { height: 36px; }
    .tc-logo-texte { font-size: 22px; }
    .tc-logo-patte { width: 32px; height: 32px; }
    .tc-joueur { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
    .tc-joueur::-webkit-scrollbar { display: none; }
    .tc-chip { font-size: 12px; padding: 3px 9px 3px 4px; }
    .tc-chip b { font-size: 14px; }
    .tc-chip small { display: none; }
    .tc-menu { justify-content: flex-start; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; margin-top: 6px; padding: 5px 4px 3px; scrollbar-width: thin; border-radius: 16px; }
    .tc-mi { min-width: 62px; width: 62px; scroll-snap-align: center; }
    .tc-mi img { width: 50px; height: 50px; }
    .tc-mi img.tc-mi-ancien { width: 52px; height: 57px; }
    .tc-mi span { font-size: 12px; }
    .tc-pub { display: none !important; }
    .tc-popin { padding: 22px 18px 18px; border-radius: 22px; }
    .tc-popin h3 { font-size: 21px; }
}
@media screen and (max-height: 500px) and (orientation: landscape) {
    .tc-entete { position: static; }
}
@media screen and (max-width: 420px) {
    body.tc table[width="900"] { padding: 0 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Popins : anneau de focus discret (le premier bouton recoit le focus a l'ouverture). */
body.tc .tc-actions .tc-bouton:focus { outline: none; }
body.tc .tc-actions .tc-bouton:focus-visible { outline: 3px solid rgba(192,50,132,.35); outline-offset: 3px; }
@media screen and (max-width: 820px) {
    /* Musee : rangees d'anciennes images collees (sans espace) qui ne pouvaient pas passer a la ligne */
    body.tc-p-musee table[width="800"] { table-layout: fixed; }
    body.tc-p-musee span > img { max-width: 19% !important; height: auto !important; }
    body.tc-p-musee span > img[width="64"] { max-width: 13.5% !important; }
}

/* Visuels 2026 remplacant les anciens : meme cadre, image recadree */
img[src*="Images/2026r/"] { object-fit: cover; }

img[src*="Images/2026r/"] { border-radius: 12px; }

/* Images de metier inserees sans dimensions (page de travail) */
img[src*="Images/2026r/metiers/"]:not([width]) { width: 169px; height: auto; max-width: 100%; }
body.tc-p-job img[src*="Images/2026r/metiers/"] { border: 3px solid #FFFDF6; box-sizing: border-box; }

/* v7 : icones et jauges vectorielles (pas de coins arrondis ni de recadrage), icones du menu 2026 hors menu */
img[src*="Images/2026r/icones/"], img[src*="Images/2026r/sante/"] { border-radius: 0; object-fit: contain; }
img[src*="Images/menu-2026/"] { object-fit: contain; }
.tc-img-casse { display: none !important; }

/* Intelligentest : resultats dans la page (avant : petite fenetre surgissante bloquee sur telephone) */
.tc-resultats { position: fixed; inset: 0; z-index: 9999; background: rgba(40, 20, 40, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tc-resultats-boite { position: relative; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: #FFFCF3; border-radius: 22px; padding: 22px 20px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: left; }
.tc-resultats-boite font { font-family: var(--tc-police) !important; }
.tc-resultats-fermer { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #F3E6FA; color: #660099; font-size: 22px; cursor: pointer; }
.tc-resultats-actions { text-align: center; margin: 14px 0 0; }
.tc-resultats-actions a { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #C03284; color: #fff !important; font-weight: 800; text-decoration: none !important; }

/* v11 : emplacement publicitaire replie tant qu'aucune annonce n'est affichee (plus d'espace vide) */
.tc-pub-attente { height: 0 !important; margin: 0 !important; overflow: hidden !important; }
.tc-pub-adsense:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }

/* v12 : la barre de defilement garde toujours sa place : plus de page qui saute de cote quand on change
   d'onglet (classements, listes plus ou moins longues). */
html { scrollbar-gutter: stable; }

/* ===== v14 : ecrin des modules de paiement Dedipass ===== */
.dp-bloc { position: relative; max-width: 560px; margin: 14px auto; padding: 16px 16px 12px; border-radius: 24px; background: #fff; border: 2px solid #F1D9B2; box-shadow: 0 14px 30px rgba(120, 70, 40, .14); text-align: left; }
.dp-bloc::before { content: ""; position: absolute; inset: -2px; border-radius: 24px; padding: 2px; pointer-events: none; background: linear-gradient(135deg, #F5B301, #C03284 45%, #660099); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.dp-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dp-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, #FFE9A8, #FFC94D); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1); }
.dp-tete b { display: block; font: 600 19px/1.2 Fredoka, Nunito, Arial, sans-serif; color: #660099; }
.dp-tete small { display: block; font-size: 13px; color: #6B5A62; margin-top: 2px; }
.dp-sur { margin-left: auto; flex: none; font: 800 11.5px Nunito, Arial, sans-serif; color: #1E7B33; background: #E3F6E1; padding: 4px 9px; border-radius: 999px; }
.dp-etapes { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 10px; padding: 0; }
.dp-etapes li { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 12px; background: #FFF8EC; font-size: 12.5px; font-weight: 700; color: #4A3A42; line-height: 1.25; }
.dp-etapes i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 12px Nunito, Arial, sans-serif; font-style: normal; color: #fff; background: #C03284; }
.dp-cadre { position: relative; min-height: 200px; border-radius: 16px; background: #FFFCF6; border: 1px solid #F3E4C8; padding: 6px; overflow: hidden; }
.dp-cadre iframe { display: block; width: 100% !important; border-radius: 12px; background: #fff; }
.dp-attente { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; color: #8A7480; font-size: 13px; transition: opacity .3s; }
.dp-attente span { width: 10px; height: 10px; border-radius: 50%; background: #C03284; animation: dp-saute 1s ease-in-out infinite; }
.dp-attente span:nth-child(2) { animation-delay: .15s; background: #F5B301; } .dp-attente span:nth-child(3) { animation-delay: .3s; background: #660099; }
.dp-attente em { flex: 1 0 100%; text-align: center; font-style: normal; }
@keyframes dp-saute { 50% { transform: translateY(-8px); } }
.dp-cadre.pret { min-height: 0; }
.dp-cadre.pret .dp-attente { opacity: 0; pointer-events: none; }
.dp-cadre.lent .dp-attente em::after { content: " (si rien ne s'affiche, rechargez la page)"; }
.dp-confiance { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.dp-confiance span { font-size: 12px; font-weight: 800; color: #5A4A52; background: #F6F0FF; padding: 4px 10px; border-radius: 999px; }
.dp-mineur { margin: 6px 0 0; font-size: 11.5px; color: #8A7480; text-align: center; }
@media (max-width: 560px) {
  .dp-bloc { padding: 12px 10px 10px; border-radius: 18px; }
  .dp-etapes { grid-template-columns: 1fr; }
  .dp-sur { display: none; }
  .dp-tete b { font-size: 17px; }
}
/* ===== v16 : module de paiement maison (SMS, appel ; carte = module Dedipass) ===== */
.dp-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0 0 10px; }
.dp-choix button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; border: 2px solid #F1D9E6; background: #FFF8FC; cursor: pointer;
  font: 800 13.5px/1.2 Nunito, Arial, sans-serif; color: #7A2F6A; transition: transform .15s, border-color .15s, background .15s; }
.dp-choix button span { font-size: 22px; line-height: 1; }
.dp-choix button b { font: 600 17px/1.1 Fredoka, Nunito, Arial, sans-serif; color: #660099; }
.dp-choix button:hover { transform: translateY(-2px); border-color: #E0A9CC; }
.dp-choix button.on { background: linear-gradient(180deg, #F26BAE, #C03284); border-color: #C03284; color: #fff; box-shadow: 0 6px 14px rgba(192, 50, 132, .28); }
.dp-choix button.on b { color: #FFE08A; }
.dp-pays { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #6B5A62; }
.dp-pays select { font: 700 14px Nunito, Arial, sans-serif; padding: 6px 10px; border-radius: 10px; border: 2px solid #F1D9E6; background: #fff; color: #4A3A42; }
.dp-panneau { border-radius: 18px; background: #FFFCF6; border: 1px solid #F3E4C8; padding: 12px; }
.dp-pas { list-style: none; counter-reset: dp; margin: 0; padding: 0; display: grid; gap: 8px; }
.dp-pas li { counter-increment: dp; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14.5px; font-weight: 700; color: #4A3A42; }
.dp-pas li::before { content: counter(dp); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 13px Nunito, Arial, sans-serif; color: #fff; background: #C03284; }
.dp-gros { display: inline-block; font: 600 24px/1.1 Fredoka, Nunito, Arial, sans-serif; color: #660099; background: #fff; border: 2px dashed #D9B8F0; border-radius: 12px; padding: 4px 12px; letter-spacing: .04em; }
.dp-action { display: none; margin: 12px 0 0; text-align: center; padding: 12px 14px; border-radius: 999px; background: linear-gradient(180deg, #45B145, #2F8F2F); color: #fff !important; text-decoration: none !important;
  font: 600 16px/1.2 Fredoka, Nunito, Arial, sans-serif; box-shadow: 0 4px 0 #1D5E1D; }
@media (pointer: coarse) { .dp-action { display: block; } }
.dp-mention { margin: 10px 0 0; font-size: 11.5px; color: #8A7480; line-height: 1.4; }
.dp-carte-txt { margin: 0 0 8px; font-size: 13.5px; color: #4A3A42; }
.dp-code { margin: 12px 0 0; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #F6F0FF, #FFF8FC); border: 2px solid #E6D6F7; }
.dp-code label { display: block; font: 600 16px Fredoka, Nunito, Arial, sans-serif; color: #660099; margin: 0 0 6px; }
.dp-code > div { display: flex; gap: 8px; }
.dp-code input[type="text"] { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid #D9B8F0; font: 800 18px Nunito, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #3B2340; background: #fff; }
.dp-code input[type="text"]:focus { outline: none; border-color: #C03284; box-shadow: 0 0 0 4px rgba(192, 50, 132, .18); }
.dp-code button { flex: none; height: 48px; padding: 0 16px; border: 0; border-radius: 14px; cursor: pointer; background: linear-gradient(180deg, #F26BAE, #C03284); color: #fff; font: 600 16px Fredoka, Nunito, Arial, sans-serif; box-shadow: 0 4px 0 #7E1752; }
.dp-code button:disabled { opacity: .7; }
.dp-mode-carte .dp-code label::after { content: " (affich\E9  apr\E8s le paiement)"; font: 700 12px Nunito, Arial, sans-serif; color: #8A7480; }
@media (max-width: 420px) {
  .dp-code > div { flex-direction: column; }
  .dp-code button { width: 100%; }
  .dp-gros { font-size: 21px; }
}

/* v21 : grands nombres - jamais coupes, format court (1,23 M, 5 Md) avec la valeur exacte en info-bulle */
b[data-court], .tc-chip b, [data-vv-compte] { white-space: nowrap; font-variant-numeric: tabular-nums; }
b[data-court][title] { cursor: help; }

/* v22 : en-tete des comptes administrateurs sur petit telephone (le bouton Quitter ne passe plus seul a la ligne) */
@media (max-width: 420px) {
  .tc-barre { gap: 4px; }
  body.tc .tc-logo img { height: 30px !important; }
  body.tc .tr-chip { padding: 4px 7px; }
  .tc-admin { gap: 2px; }
  .tc-admin button { padding: 3px; }
  .tc-admin-lien { padding: 3px; font-size: 14px; }
}

/* v23 : transitions douces entre les pages, facon application (navigateurs recents, sans effet ailleurs).
   L'en-tete reste en place, le contenu glisse. */
@view-transition { navigation: auto; }
.tc-entete { view-transition-name: tc-entete; }
::view-transition-old(root) { animation: tc-vt-sortie .16s ease-in both; }
::view-transition-new(root) { animation: tc-vt-entree .24s ease-out both; }
@keyframes tc-vt-sortie { to { opacity: 0; transform: translateY(-6px); } }
@keyframes tc-vt-entree { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
