@import url("styles_old.css");

:root {
    --green-950: #15520f;
    --green-800: #1cb011;
    --green-700: #1cb011;
    --green-600: #1cb011;
    --green-100: #d9f5d6;
    --green-50: #f3fcf2;
    --brand-green-dark: #1cb011;
    --brand-green: #1cb011;
    --brand-green-light: #e1f8df;
    --brand-cream: #f7fbf4;
}

body:not(.landing-page) {
    background: var(--brand-cream);
}

body:not(.landing-page) > header {
    background: var(--brand-green-dark);
}

.association-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 100px;
    min-height: 100px;
    padding: 10px clamp(20px, 4vw, 64px);
    overflow: hidden;
    color: #fff;
    background-color: rgba(28, 176, 17, .82);
    background-image: url("golf-background.png");
    background-position: center 53%;
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    box-shadow: 0 8px 25px rgba(18, 61, 42, .2);
}

.association-header__identity {
    display: flex;
    align-items: center;
    gap: clamp(7px, 1.2vw, 16px);
    min-width: 0;
    line-height: 1;
    white-space: nowrap;
}

.association-header__identity > span,
.association-header h1,
.association-header__identity strong {
    color: #fff;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
}

.association-header__identity > span {
    display: inline-block;
    margin: 0;
}

.association-header h1 {
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.association-header__identity strong {
    display: block;
}

.user-session {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.association-header .user-session {
    align-items: center;
    flex-direction: row;
    gap: clamp(7px, 1vw, 12px);
    margin: 0;
}

.user-session form {
    display: inline-flex;
    margin: 0;
}

.user-session button {
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.user-session button:hover,
.user-session button:focus-visible {
    color: #fff;
    background: transparent;
    transform: none;
}

.admin-user-session {
    margin: 0 0 .8rem;
}

.admin-user-session strong {
    color: #fff;
}

.admin-menu-logout {
    display: inline-flex;
    margin: 0;
}

.admin-menu-logout button {
    padding: .48rem .75rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    box-shadow: none;
    line-height: inherit;
}

.association-header nav {
    flex: 0 0 auto;
}

.mobile-menu-toggle {
    display: none;
}

.reservation-action {
    margin-top: .8rem;
}

.reservation-action button {
    padding: .48rem .8rem;
    border-radius: 999px;
    background: var(--brand-green);
    font-size: .85rem;
}

.reservation-indisponible {
    margin: .8rem 0 0;
    padding: .45rem .6rem;
    border-radius: 7px;
    color: #704c15;
    background: #fff3d7;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.35;
}

.page-reservations main {
    width: min(98%, 1900px);
}

.planning-table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.planning-golf-name {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
}

.planning-golf-card {
    padding: .75rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 400;
    line-height: 1.45;
}

.planning-golf-row > th,
.planning-golf-row > td {
    background-color: var(--golf-row-color) !important;
}

.reservation-cell-details {
    margin: 0;
    border: 0 !important;
    border-radius: 8px;
    font-size: .82rem;
}

.reservation-cell-details th,
.reservation-cell-details td {
    min-width: 0;
    padding: .38rem .45rem;
    background: #fff;
}

.reservation-cell-details th {
    width: 46%;
    color: var(--green-950);
    background: var(--green-100);
}

.reservation-cell-details__empty {
    color: #607067;
    font-style: italic;
}

.planning-player-name {
    font-size: .95rem;
    font-weight: 800;
    text-transform: uppercase;
}

.reservation-player-row__name {
    width: 60%;
    vertical-align: middle;
}

.reservation-player-row__action {
    text-align: center;
    vertical-align: middle;
}

.reservation-cell-details__action td {
    text-align: center;
}

.reservation-cell-details form,
.reservation-cell-details .reservation-indisponible {
    margin: .25rem 0;
}

.reservation-cell-details button {
    padding: .25rem .5rem;
    font-size: .72rem;
    line-height: 1.2;
}

.planning-repeat-header th {
    color: #000;
    background: #fff;
    font-size: .82rem;
}

.planning-repeat-header:not(:first-child) th {
    border-top: 12px solid var(--green-50);
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.admin-parcours-page main {
    width: min(99%, 2200px);
}

.parcours-list-scroll {
    width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.parcours-list-table {
    width: 100%;
    font-size: .82rem;
}

.parcours-list-table th,
.parcours-list-table td {
    padding: .35rem .4rem;
}

.parcours-list-table th {
    white-space: normal;
}

.parcours-list-table td {
    overflow-wrap: anywhere;
}

.quota-matrix input[type="number"] {
    width: 4.5rem;
    min-width: 4.5rem;
    margin: 0;
}

.quota-distribution-section {
    width: 100%;
}

.quota-distribution-section > form {
    width: 100%;
}

.quota-matrix-scroll {
    width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.quota-matrix {
    width: 100%;
    font-size: .82rem;
}

.quota-matrix th,
.quota-matrix td {
    padding: .35rem .4rem;
    text-align: center;
}

.quota-matrix th:first-child {
    min-width: 8rem;
    text-align: left;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tutorial-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 1rem 0 2rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--green-100);
}

.tutorial-summary a {
    color: var(--green-950);
    border-color: var(--border);
    background: #fff;
}

.tutorial-section {
    margin: 1rem 0;
    padding: 1.25rem 1.4rem;
    border-left: 5px solid var(--green-600);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(40, 95, 67, .08);
}

.tutorial-section h3 {
    margin-top: 0;
}

.tutorial-section li {
    margin: .45rem 0;
    line-height: 1.55;
}

.button-link {
    display: inline-block;
    padding: .65rem 1rem;
    color: #fff;
    border-radius: 8px;
    background: var(--green-700);
    text-decoration: none;
}

.button-link:hover,
.button-link:focus-visible {
    color: #fff;
    background: var(--green-800);
}

.management-links {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin: 1rem 0 1.5rem;
}

/* Présentation compacte commune aux espaces joueur et administrateur. */
body:not(.landing-page) > header {
    padding: .75rem clamp(.8rem, 3vw, 2.5rem);
}

body:not(.landing-page) > header h1 {
    margin-bottom: .4rem;
}

nav {
    gap: .3rem;
}

nav a {
    padding: .32rem .55rem;
    font-size: .88rem;
}

main {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: clamp(.75rem, 1.6vw, 1.25rem);
}

h2 {
    margin: 1.1rem 0 .75rem;
    padding-bottom: .35rem;
}

h3,
h4 {
    margin-top: 1rem;
    margin-bottom: .55rem;
}

p {
    margin-top: .45rem;
    margin-bottom: .65rem;
    line-height: 1.4;
}

form {
    margin: .5rem 0;
}

main > form,
main > section,
main > article,
fieldset {
    padding: .7rem .85rem;
}

fieldset {
    margin: .65rem 0;
}

input,
select,
textarea {
    margin-top: .2rem;
    padding: .45rem .55rem;
    line-height: 1.25;
}

button,
.button-link {
    padding: .45rem .7rem;
    font-size: .9rem;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    margin: .1rem;
    padding: .2rem;
    border: 1px solid var(--border);
    border-radius: .4rem;
    color: var(--green-800);
    background: #fff;
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.icon-action > span[aria-hidden="true"] {
    display: none;
}

.icon-action::before {
    width: 1.15rem;
    height: 1.15rem;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
}

.icon-action--edit::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231cb011' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25Zm17.71-10.04a.996.996 0 0 0 0-1.41l-2.5-2.5a.996.996 0 0 0-1.41 0l-1.96 1.96 3.75 3.75 2.12-1.8Z'/%3E%3C/svg%3E");
}

.icon-action--delete {
    color: #c62828;
    background-color: #fff !important;
    background-image: none !important;
}

.icon-action--delete::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c62828' d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12Zm3.46-7.12 1.41-1.41L12 11.59l1.12-1.12 1.41 1.41L13.41 13l1.12 1.12-1.41 1.41L12 14.41l-1.12 1.12-1.41-1.41L10.59 13l-1.13-1.12ZM15.5 4l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E");
}

.icon-action:hover,
.icon-action:focus-visible {
    border-color: currentColor;
    background: #fff;
}

.icon-action--delete:hover,
.icon-action--delete:focus-visible {
    border-color: #b42318;
    color: #b42318;
    background-color: #fff !important;
    background-image: none !important;
}

form:has(input[value="supprimer_joueur"]) button.icon-action--delete,
form:has(input[value="supprimer_parcours"]) button.icon-action--delete,
form:has(input[value="supprimer_indisponibilite_parcours"]) button.icon-action--delete,
form:has(input[value="supprimer_message"]) button.icon-action--delete,
form:has(input[value="supprimer_sujet"]) button.icon-action--delete,
form:has(input[value="supprimer_reponse"]) button.icon-action--delete {
    background-color: #fff !important;
    background-image: none !important;
}

table {
    margin: .65rem 0 1rem;
}

th,
td {
    padding: .45rem .5rem;
    line-height: 1.3;
}

ul,
ol {
    margin-top: .45rem;
    margin-bottom: .7rem;
}

li {
    margin: .2rem 0;
}

.management-links {
    gap: .45rem;
    margin: .65rem 0 1rem;
}

.tutorial-summary {
    gap: .35rem;
    margin: .65rem 0 1rem;
    padding: .65rem;
}

.tutorial-section {
    margin: .65rem 0;
    padding: .8rem 1rem;
}

.tutorial-section li {
    margin: .25rem 0;
    line-height: 1.4;
}

.parcours-color-field .parcours-color-picker {
    width: 5rem;
    height: 3rem;
    padding: .2rem;
    cursor: pointer;
}

.parcours-color-field output {
    display: inline-block;
    margin-left: .6rem;
    font-weight: 700;
    vertical-align: middle;
}

@media (max-width: 720px) {
    .association-header {
        position: relative;
        align-items: center;
        height: auto;
        min-height: 72px;
        padding: 12px 16px;
        overflow: visible;
    }

    .association-header__identity {
        display: block;
        padding-right: 52px;
        white-space: normal;
    }

    .association-header__identity > span {
        display: none;
    }

    .association-header .user-session {
        display: block;
        margin-top: 5px;
    }

    .association-header .user-session form {
        margin-left: 8px;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 15px;
        right: 16px;
        z-index: 3;
        display: grid;
        width: 44px;
        height: 44px;
        padding: 10px;
        place-content: center;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, .55);
        border-radius: 8px;
        background: rgba(0, 0, 0, .14);
        box-shadow: none;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform .2s ease, opacity .2s ease;
    }

    .mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    .mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .association-header nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 2;
        display: none;
        padding: 10px 16px 16px;
        background: var(--brand-green-dark);
        box-shadow: 0 10px 20px rgba(18, 61, 42, .25);
    }

    .association-header.mobile-menu-open nav {
        display: grid;
        gap: 5px;
    }

    .association-header nav a,
    .association-header nav a:not(:first-child) {
        display: block;
        padding: 11px 12px;
        font-size: .95rem;
    }

    .page-reservations main {
        width: 100%;
        overflow-x: hidden;
    }

    .planning-table-scroll table {
        min-width: 1180px;
    }

    .association-header__identity > span,
    .association-header h1,
    .association-header__identity strong { font-size: .95rem; }
}
