/* Réservations club de pétanque — styles
   Thème noir & blanc inspiré de www.cpbulle.ch
   (--vert est conservé comme nom de variable mais vaut désormais noir) */
:root {
    --vert: #1c1c1c;
    --vert-fonce: #000;
    --sable: #eceae6;
    --rouge: #c62828;
    --orange: #d97706;
    --gris: #6b6b6b;
    --bord: #e2e0dc;
    --ok: #2e7d32;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--sable);
    /* photo du boulodrome (cpbulle.ch) sous un voile clair, pour la lisibilité */
    background-image: linear-gradient(rgba(238, 236, 232, .72), rgba(238, 236, 232, .72)),
                      url('fond.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #222;
    line-height: 1.55;
}

/* ---------- En-tête ---------- */
header.site {
    background: linear-gradient(135deg, rgba(0, 0, 0, .68) 0%, rgba(25, 25, 25, .78) 100%),
                url('fond.jpg') center 35% / cover no-repeat;
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
header.site h1 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}
header.site h1::before {
    content: '';
    width: 42px;
    height: 43px;
    flex: none;
    background: url('logo.png') no-repeat center / contain;
}
header.site a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
    font-size: .92em;
    letter-spacing: .5px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
}
header.site a:hover { border-bottom-color: #fff; }
header.site nav { display: flex; flex-wrap: wrap; align-items: center; }

main { max-width: 1000px; margin: 26px auto; padding: 0 16px; }

h2 {
    color: var(--vert-fonce);
    letter-spacing: .8px;
    text-transform: uppercase;
    font-size: 1.15em;
    border-left: 4px solid var(--vert-fonce);
    padding-left: 10px;
}
h3 { letter-spacing: .4px; }

/* ---------- Cartes ---------- */
.card {
    background: #fff;
    border: 1px solid var(--bord);
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

/* ---------- Messages flash ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.flash-ok { background: #eef6ee; border: 1px solid var(--ok); color: var(--ok); }
.flash-err { background: #fdeeee; border: 1px solid var(--rouge); color: var(--rouge); }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .92em; letter-spacing: .3px; }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=time], input[type=password], input[type=number], select, textarea {
    width: 100%;
    max-width: 420px;
    padding: 9px 10px;
    border: 1px solid #cfcdc8;
    border-radius: 6px;
    font: inherit;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--vert-fonce);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}
textarea { max-width: 600px; min-height: 80px; }

.btn {
    display: inline-block;
    background: var(--vert);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 22px;
    font: inherit;
    font-weight: 600;
    letter-spacing: .6px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 12px;
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { background: #000; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.btn-danger { background: var(--rouge); }
.btn-danger:hover { background: #8e0000; }
.btn-secondaire { background: var(--gris); }
.btn-secondaire:hover { background: #4a4a4a; }
.btn-petit { padding: 4px 12px; margin-top: 0; font-size: .88em; }

/* ---------- Tableaux ---------- */
table.liste {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
table.liste th, table.liste td { border: 1px solid var(--bord); padding: 9px 12px; text-align: left; }
table.liste th {
    background: var(--vert);
    color: #fff;
    font-weight: 600;
    letter-spacing: .6px;
    font-size: .9em;
    text-transform: uppercase;
    border-color: #333;
}
table.liste tr:nth-child(even) { background: #faf9f7; }
table.liste tr:hover td { background: #f3f1ed; }

/* ---------- Badges de statut ---------- */
.badge { padding: 2px 11px; border-radius: 12px; font-size: .85em; color: #fff; white-space: nowrap; }
.badge-en_attente { background: var(--orange); }
.badge-approuvee { background: var(--ok); }
.badge-refusee { background: var(--rouge); }

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav h2 { margin: 0; text-transform: capitalize; border: none; padding-left: 0; letter-spacing: 1px; font-size: 1.35em; }
.cal-nav-gauche { display: flex; align-items: center; gap: 6px; }
.cal-nav-gauche h2 { margin-left: 12px; }
.cal-fleche { font-size: 1.25em; line-height: 1; padding: 4px 14px; }
table.calendrier {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .08);
}
table.calendrier th {
    background: var(--vert);
    color: #fff;
    padding: 8px;
    letter-spacing: 1px;
    font-size: .85em;
    text-transform: uppercase;
}
table.calendrier td {
    border: 1px solid var(--bord);
    vertical-align: top;
    height: 92px;
    padding: 5px;
    font-size: .85em;
    transition: background .12s ease;
}
table.calendrier td[data-date]:hover { background: #f4f2ee; }
td.hors-mois { background: #f0efec; color: #bbb; }
td.aujourdhui { outline: 2px solid var(--orange); outline-offset: -2px; }
.cal-jour { font-weight: 700; color: #444; }
.cal-resa {
    display: block;
    background: #e9f3e9;
    border-left: 3px solid var(--ok);
    border-radius: 3px;
    padding: 2px 5px;
    margin-top: 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #1b3d1b;
    text-decoration: none;
    font-size: .95em;
}
.cal-resa.attente { background: #fdf1df; border-left-color: var(--orange); color: #6b4a09; }

/* ---------- Photo du boulodrome ---------- */
.photo-boulodrome {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

/* ---------- Divers ---------- */
.grille { display: flex; gap: 22px; flex-wrap: wrap; }
.grille > div { flex: 1 1 300px; }
.muted { color: var(--gris); font-size: .9em; }
.inline-form { display: inline; }

footer.site {
    text-align: center;
    color: var(--gris);
    padding: 26px 20px;
    font-size: .85em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
    header.site { flex-direction: column; align-items: flex-start; }
    header.site a { margin-left: 0; margin-right: 14px; }
    table.liste { display: block; overflow-x: auto; }
    main { margin-top: 12px; }
}

@media (max-width: 600px) {
    table.calendrier td { height: 60px; font-size: .7em; }
    .cal-resa { font-size: .9em; }
}
