body {
    background-color: var(--pcmmod-bg-page);
    color: var(--pcmmod-text-primary);
    font-family: Noto Sans, sans-serif;
    margin: 0px;
    min-width: 300px;
    min-height: 100vh;
    text-align: center;
}

main {
    margin: 0;
    padding: 128px 8vw 40px;
}

/* Pages that don't use <main>: add nav clearance + gutters automatically */
body:not(:has(main)) {
    padding-top: 72px;
    box-sizing: border-box;
}

a {
    color: var(--pcmmod-text-secondary);
}
a:hover {
    color: var(--pcmmod-color-hover-lightGrey);
}
h1 {
    margin: 0 auto 32px;
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: var(--pcmmod-text-primary);
    position: relative;
    padding-bottom: 18px;
}
h1::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--pcmmod-color-main-yellow);
    border-radius: 2px;
    margin: 12px auto 0;
}

h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    background-color: transparent;
    color: var(--pcmmod-text-primary);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0;
    border: none;
    border-radius: 0;
    max-width: none;
    margin: 52px auto 26px;
}
h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--pcmmod-local-color-h2-after, var(--pcmmod-color-main-yellow));
    border-radius: 2px;
    flex-shrink: 0;
}
h2 a {
    color: black;
}
h2.section-title a {
    color: inherit;
}
h3 {
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    text-align: center;
}
h3 a {
    color: var(--pcmmod-color-main-yellow);
}

.box {
    border: 3px solid var(--pcmmod-color-main-yellow);
    border-radius: 3px;
    padding: 4px;
    margin: 10px;
}
h4 {
    font-size:16px;
    display: block;
    margin-block-start: 1.33em;
    margin-block-end: 1.33em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
}
img 
{
    max-width: 100%;
}
@media only screen and (max-width: 1110px) {
    textarea {
        width: 90%;
    }
}

.country-flag {
    vertical-align: middle; 
    margin-right: 8px;
}

.container{
    width: 100%;
}
.right{
    display: inline-block;
    width: 58%;
    vertical-align: top;
    margin:1%;
}
.left{
    display: inline-block;
    width: 38%;
    vertical-align: top;
    margin:1%;
}
@media only screen and (max-width: 1100px) {
    .right{
        display: block;
        width: 100%;
    }
    .left{
        display: block;
        width: 100%;
    }
}
.cardsContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    margin: 10px;
    gap: 40px 10px;
}

/*
*******************************************************************************
mise en forme des form
*/

form {
    text-align: center;
    width: 92%;
    max-width: 480px;
    padding: 28px 32px 32px;
    border: 1px solid var(--pcmmod-border-color);
    background: var(--pcmmod-bg-surface);
    box-shadow: var(--pcmmod-shadow);
    color: var(--pcmmod-text-primary);
    border-radius: 16px;
    margin: auto;
    margin-top: 30px;
    box-sizing: border-box;
}

fieldset {
    border-radius: 8px;
    border: 1px solid var(--pcmmod-border-color);
    margin: 10px 0;
    padding: 12px 16px;
}

input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="url"] {
    height: 38px;
    margin: 1%;
    width: 60%;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--pcmmod-border-color);
    background: var(--pcmmod-bg-page);
    color: var(--pcmmod-text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="url"]:focus {
    outline: none;
    border-color: var(--pcmmod-color-main-yellow);
    box-shadow: 0 0 0 3px rgba(245, 182, 9, 0.2);
}
input[type="text"]:invalid, input[type="password"]:invalid, input[type="file"]:invalid, input[type="number"]:invalid, input[type="date"]:invalid, input[type="url"]:invalid {
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.35);
}
input[type="button"],
input[type="submit"],
input[type="reset"] {
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 10px 22px;
    margin: 2px;
    transition: filter .2s ease-in-out;
    border: 0px;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="button"]:hover,
input[type="submit"]:hover{
    filter:brightness(115%)
}

select {
    max-width: 90%;
    margin: 1%;
    width: 60%;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--pcmmod-border-color);
    background: var(--pcmmod-bg-page);
    color: var(--pcmmod-text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
select option{
    line-height: 28px;
}
select :nth-child(2n) {
    background-color: var(--pcmmod-color-main-lightGrey);
}
select :nth-child(2n+1) {
    background-color: var(--pcmmod-color-main-lightGrey2);
}
select:focus{
    outline: none;
    border-color: var(--pcmmod-color-main-yellow);
    box-shadow: 0 0 0 3px rgba(245, 182, 9, 0.2);
    background-color: var(--pcmmod-bg-surface);
}


form label {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--pcmmod-text-muted);
    margin-top: 14px;
    margin-bottom: 4px;
    padding-left: 2px;
}

/* Stacked layout: inputs/selects fill the form width */
form input[type="text"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="url"],
form select {
    width: 100%;
    margin: 0;
}

/* Collapse the <br/> separators inside forms — spacing comes from label margin-top */
form br {
    display: none;
}

/* Buttons and checkboxes keep natural flow */
form input[type="submit"],
form input[type="button"],
form input[type="reset"],
form input[type="checkbox"] {
    width: auto;
    margin: 12px 2px 0;
}

/* Dropdown component: follow the same sizing as inputs inside forms */
form .dropdown {
    width: 100%;
    margin: 0;
    display: block;
}

form .dad{
    width:150px; 
    height:150px; 
    border: 2px dashed;
    border-radius: 8px;
    border-color: var(--pcmmod-color-main-lightGrey);
    display: inline-flex;
    margin: 1%;
    justify-content: flex-start;
    flex-direction: column;
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
}
form .dad.required{
    border-color: var(--pcmmod-color-border-lightGrey);
}
form .dad:hover{
    filter: brightness(0.8);
}
.is-dragover {
    filter: brightness(0.9);
}
form .dad.valid{
    border-color: var(--pcmmod-color-valid-green);
}

/* ── Search form ─────────────────────────────────────────────────────────── */
/* Wide layout override for multi-fieldset advanced search forms */
form.search-form {
    max-width: 1100px;
    width: 95%;
    text-align: center;
    padding: 20px 24px 28px;
}

.main-search {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin-bottom: 8px;
}

.main-search > label {
    display: none;
}

form.search-form .main-search > input,
form.search-form .main-search > select,
form.search-form .main-search > .dropdown {
    flex: 1 1 220px;
    max-width: 340px;
    width: auto;
    margin: 0;
}

form.search-form .main-search > .dropdown .dropdown__inputexpandmore {
    transform: translateY(60%) translateX(-130%);
}

.spoiler {
    flex-basis: 100%;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 4px;
}

.advancedSearch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    margin-top: 12px;
    text-align: left;
}

.advancedSearch > * {
    flex: 1 1 260px;
    max-width: 420px;
}

/* Checkbox labels — undo block/uppercase from the generic form label rule */
.checkbox-label {
    display: inline !important;
    width: auto !important;
    text-transform: none !important;
    font-size: 0.88rem !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    color: var(--pcmmod-text-primary) !important;
    margin: 0 0 0 5px !important;
    padding-left: 0 !important;
    vertical-align: middle;
}

.inputImageLink {
    display: flex;
    align-items: center;
}

.inputImageLink__content {
    display: flex;
    flex-basis: 60%;
    flex-grow: 1;
    align-items: center;
    justify-content: space-around;
    margin: 4px;
    border: dashed 2px var(--pcmmod-color-main-lightGrey);
    border-radius: 8px;
    height: 64px;
}

.inputImageLink__content img {
    object-fit:cover;
    border-radius: 4px;
    box-shadow: 0 0 5px 1px var(--pcmmod-color-main-lightGrey);
}
.inputImageLink__content__buttons {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
}
.inputImageLink .button{
    color: var(--pcmmod-color-main-darkGrey);
    width: 30px;
    height: 30px;
    background-color: white;
    padding: 1px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left:0;
    cursor: pointer;
    transition: all .2s ease-in-out;
    border: solid 1px grey;
}
.inputImageLink .button:hover{
    background-color: white;
    filter:brightness(115%);
    border: solid 1px var(--pcmmod-color-main-darkGrey);
}
.inputImageLink .button.remove{
    color: red;
}


.inputImageLink .button:disabled{
    color: grey;
    cursor: not-allowed;
}
/* disable button disable hover effect */
.inputImageLink .button:disabled:hover{
    filter:brightness(100%);
}

@media only screen and (max-width: 570px) {
    form {
        padding: 22px 18px 26px;
    }
}

/*
*******************************************************************************
mise en forme des alertes
*/
.alert {
    text-align: center;
    border-radius: 8px;
    margin: 30px;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 10px;
    background-color: var(--pcmmod-bg-surface);
    color: var(--pcmmod-text-primary);
    z-index: 1000;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--pcmmod-shadow-lg);
    border: 1px solid var(--pcmmod-border-color);
}

.alert > span, .alert > p {
    margin: 5px;
}

.error .info-icon{
    color: red;
}
.done .info-icon{
    color: green;
}

.alert > .progress-bar {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--pcmmod-color-background-darkGrey);
    animation: progress var(--pcmmod-time-hideAlert) linear;
    border-radius: 8px;
    opacity: 0.15;
}

.alert .alert-close {
    cursor: pointer;
}
.alert .alert-close:hover {
    color: var(--pcmmod-color-hover-darkGrey);
}

@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}
@keyframes hide {
    0% {
        opacity: 1;
    }
    94% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}


/*
*******************************************************************************
mise en forme des maillots
*/

.maillots {
    display: inline-block;
    border-radius: 10px;
    padding: 20px;
    margin: 6px;
    background-color: var(--pcmmod-bg-surface);
    min-width: 280px;
    width: 20%;
    color: var(--pcmmod-text-secondary);
    border: 1px solid var(--pcmmod-border-color);
    box-shadow: var(--pcmmod-shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.maillots:hover {
    background-color: var(--pcmmod-bg-surface-hover);
    box-shadow: var(--pcmmod-shadow);
}
.maillots .mini{
    height: 150px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}
.maillots h3 {
    margin: 3px;
    white-space: nowrap;
}
@media only screen and (max-width: 1024px) {
    .maillots h3 {
        white-space: normal;
    }
    .maillots {
        min-width: 250px;
    }
}
.maillots h4 {
    margin: 1px;
}
.textemaillot {
    color: grey;
}
.real {
    padding: 3px;
    transform: rotate(-45deg);
    color: var(--pcmmod-color-main-lightGrey);
    position: absolute;
    font: italic small-caps bold 16px/2 cursive;
    z-index: 0;
}

/*
*******************************************************************************
BlackBox
*/
.blackbox {
    display: inline-block;
    border: 1px solid var(--pcmmod-border-color);
    border-radius: 10px;
    padding: 8px;
    margin: 6px;
    background-color: var(--pcmmod-bg-surface);
    min-width: 100px;
    min-height: 100px;
    /*max-width: 200px;
    max-height: 220px;*/
    color: var(--pcmmod-text-primary);
    transition: background-color 0.3s, box-shadow 0.3s;
    text-align: center;
    box-shadow: var(--pcmmod-shadow-sm);
}
.blackbox img{
    max-height: 180px;
}
a.blackbox:hover {
    background-color: var(--pcmmod-bg-surface-hover);
    box-shadow: var(--pcmmod-shadow);
}
a.blackbox{
    text-decoration: none;
}

.boxblack {
    border: 1px solid var(--pcmmod-border-color);
    border-radius: 10px;
    background-color: var(--pcmmod-bg-surface);
    color: var(--pcmmod-text-primary);
}

.bigButtonImage{
    position: relative;
    overflow: hidden;
    width: 280px;
    height: 160px;
    background-position: center;
    background-size: cover;
    background-color: var(--pcmmod-bg-surface);
    transition: transform .35s ease, box-shadow .35s ease;
    border-radius: 12px;
    border: none;
    padding: 0;
}
.bigButtonImage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.72) 100%);
    border-radius: 12px;
    z-index: 0;
    transition: opacity .35s ease;
}
.bigButtonImage:hover::after {
    opacity: 0.85;
}
.bigButtonImage h3,
.bigButtonImage > span,
.bigButtonImage > p {
    position: relative;
    z-index: 1;
    color: #ffffff !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    margin: 0;
    padding: 0 12px;
}
.bigButtonImage h3 {
    font-size: 1rem;
}
.bigButtonImage h3 a {
    color: #ffffff !important;
}
/* Position the text at the bottom of the card */
a .bigButtonImage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 14px;
    gap: 2px;
}
.bigButtonImage:hover{
    transform: scale(1.04) translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
a.blackbox.bigButtonImage:hover {
    background-color: var(--pcmmod-bg-surface);
}
#minijersey_generator_button{
    background-image:url(/https/pcmmod.com/img/visual/minigene.png);
}
#jersey_random_button{
    background-image:url(/https/pcmmod.com/img/visual/randomjersey.png);
}
#jersey_viewer_button {
    background-image:url(/https/pcmmod.com/img/visual/jerseyviewer.png);
}
#equipment_viewer_button {
    background-image:url(/https/pcmmod.com/img/visual/equipmentviewer.png);
}
#admin_panel_button{
    background-image:url(/https/pcmmod.com/img/visual/adminpanel.png);
}

/* ── Tools grid ────────────────────────────────────────────── */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 4px 8vw 36px;
}

.tools-grid > a {
    text-decoration: none;
}

.tools-grid .bigButtonImage {
    height: 190px;
    width: 300px;
}

@media (max-width: 600px) {
    .tools-grid {
        gap: 12px;
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

.loading-google-icon {
    animation: rotate 2s linear infinite;
}
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}
/*
*******************************************************************************
Peloton
*/
.peloton {
    display: inline-block;
    margin-left: -100px;
    transition: transform .2s;
}
.peloton img {
    width: 180px;
}
.peloton:hover {
    transform: translate(-2%, -4%);
}
.allpeloton {
    margin-left: 100px;
}
.groupe {
    padding: 6px;
    display: inline-block;
    border: 1px solid var(--pcmmod-border-color);
    border-radius: 10px;
    background-color: var(--pcmmod-bg-surface);
    min-width: 180px;
    min-height: 200px;
    color: var(--pcmmod-text-primary);
    box-shadow: var(--pcmmod-shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.groupe:hover {
    background-color: var(--pcmmod-bg-surface-hover);
    box-shadow: var(--pcmmod-shadow);
    transform: rotate(1deg);
}
@media only screen and (max-width: 470px) {
    .allpeloton {
        margin-left: 50px;
    }
    .peloton {
        display: inline-block;
        margin-left: -40px;
    }
    .peloton img {
        max-width: 90px;
    }
}
/*
*******************************************************************************
boutons
*/
.button {
    display: inline-block;
    border-radius: 6px;
    color: #000;
    border: 1px solid var(--pcmmod-color-main-yellow);
    padding: 10px 16px;
    margin: 2px;
    text-decoration: none;
    background-color: var(--pcmmod-color-main-yellow);
    cursor: pointer;
    font-weight: 600;
    transition: filter .2s ease-in-out;
}
.button:hover {
    filter: brightness(115%);
}

.button a {
    text-decoration: none;
    color: black;
    padding: 15px;
}
#no {
    background-color: var(--pcmmod-color-main-yellow);
    color: rgb(0, 0, 0);
    cursor: not-allowed;
}

@keyframes shake {
    33% { transform: rotate(10deg); }

    66% { transform: rotate(-10deg); }

    100% { transform: rotate(10deg); }
}


/*
*******************************************************************************
etoiles
*/
#stars a {
    all: revert;
}
#stars a span {
    all: revert;
    display: inline-block;
    font-size: 30px;
}
#stars a:hover {
    all: revert;
}
#stars:hover > a span:before {
    content: "\2605";
    position: absolute;
}
#stars > a:hover ~ a span:before {
    content: "";
}

/*
*******************************************************************************
sponsor logo ==> brand equipment
*/
.brand_logo img{
    max-width:150px;
    max-height:75px;
    filter: grayscale(1) brightness(0.5) contrast(70%);
    transition: filter 0.5s ease-in-out;
}
.brand_logo{
        background-color: rgb(216, 216, 216);
        border: solid rgb(87, 87, 87);
        display: inline-block;
        width: 150px;
        height: 75px;
        vertical-align: top;
        transition: background-color 0.5s ease-in-out, transform .5s;
}

.brand_logo:hover{
    background-color: white;
    transform: scale(1.1);
}
.brand_logo:hover img{
    filter : hue-rotate(180deg) invert(100%);
    filter: none;
}


/* fieldset rules consolidated above */