/* ============================================================
   FFME - Gestion Matériel CT31-32
   Charte graphique inspirée de www.ffme.fr
   ============================================================ */

:root {
    --ffme-bleu-clair: #01a1e5;
    --ffme-bleu-fonce: #03378c;
    --ffme-rouge: #ee1825;
    --ffme-vert: #009900;
    --ffme-noir: #11161d;
    --ffme-texte: #1f1f1f;
    --ffme-gris: #d5d4d4;
    --ffme-cellule: #e6e6e6;
    --ffme-fond: #f2f4f6;
    --ffme-radius: 6px;
}

/* ---------- Base ---------- */

body {
    background: var(--ffme-fond);
    color: var(--ffme-texte);
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--ffme-noir);
}

a { color: var(--ffme-bleu-clair); }
a:hover { color: var(--ffme-rouge); }

.ffme-main {
    flex: 1 0 auto;
    padding: 2.2rem 0 4rem;
    width: 100%;
}

/* ---------- Topbar (style header ffme.fr) ---------- */

.ffme-topbar {
    background: #fff;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, .15);
    position: sticky;
    top: 0;
    z-index: 900;
}

.ffme-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: .55rem 0;
    flex-wrap: wrap;
}

.ffme-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: var(--ffme-noir);
}

.ffme-brand:hover { color: var(--ffme-noir); }

.ffme-brand img {
    height: 46px;
    width: auto;
}

.ffme-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ffme-brand-top {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ffme-noir);
}

.ffme-brand-sub {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--ffme-bleu-clair);
}

.ffme-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ffme-nav a {
    position: relative;
    color: var(--ffme-noir);
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .4px;
    padding: 1rem 0 .65rem;
    white-space: nowrap;
}

.ffme-nav a:hover { color: var(--ffme-bleu-clair); }

.ffme-nav a.current {
    color: var(--ffme-rouge);
}

.ffme-nav a.current::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--ffme-rouge);
}

.ffme-user {
    display: flex;
    align-items: center;
    gap: .9rem;
    flex-wrap: wrap;
}

.ffme-user-name {
    color: #5a6b7a;
    font-size: .88rem;
    font-weight: 600;
}

.ffme-user-name .bi { color: var(--ffme-bleu-clair); }

.ffme-logout {
    background: var(--ffme-rouge);
    color: #fff !important;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: .5rem 1.1rem;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
}

.ffme-logout:hover {
    background: #c4111d;
    color: #fff !important;
}

/* ---------- Hero bannière ---------- */

.ffme-hero {
    background: linear-gradient(120deg, rgba(3, 55, 140, .95) 0%, rgba(2, 74, 158, .92) 45%, rgba(1, 161, 229, .88) 100%), url('../images/backgrounddash2.jpg') center/cover no-repeat;
    color: #fff;
    margin: 0 0 2.2rem;
    padding: 3.4rem 2.4rem 2.8rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--ffme-radius);
    box-shadow: 0 12px 34px rgba(3, 55, 140, .28);
}

.ffme-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 320px;
    height: 320px;
    background: url('https://upload.wikimedia.org/wikipedia/commons/5/5e/Picto_montagne.svg') center/contain no-repeat;
    opacity: .1;
    pointer-events: none;
}

.ffme-hero-kicker {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: .85rem;
    color: #bfe6fa;
    margin: 0 0 .5rem;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.ffme-hero-kicker::before {
    content: '';
    width: 26px;
    height: 4px;
    background: var(--ffme-rouge);
}

.ffme-hero h1 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-shadow: 2px 2px 7px rgba(0, 0, 0, .45);
    position: relative;
    z-index: 1;
}

.ffme-hero p {
    margin: .7rem 0 0;
    font-size: 1rem;
    color: #e8f6fd;
    position: relative;
    z-index: 1;
}

/* ---------- Titres de page ---------- */

.ffme-page-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ffme-bleu-fonce);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.6rem;
}

.ffme-page-title::before {
    content: '';
    width: 30px;
    height: 4px;
    background: var(--ffme-rouge);
    flex: 0 0 auto;
}

.ffme-page-title span { color: var(--ffme-bleu-clair); }

/* ---------- Étiquettes de section (style "NOS PARTENAIRES") ---------- */

.ffme-section-label {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: .95rem;
    font-weight: 500;
    color: var(--ffme-noir);
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 1.4rem;
}

.ffme-section-label::before {
    content: '';
    width: 26px;
    height: 4px;
    background: var(--ffme-rouge);
    flex: 0 0 auto;
}

.ffme-section-label .bi { color: var(--ffme-bleu-clair); }

/* ---------- Cartes ---------- */

.ffme-card {
    background: #fff;
    border-radius: var(--ffme-radius);
    border-top: 4px solid var(--ffme-bleu-clair);
    box-shadow: 0 2px 12px rgba(17, 22, 29, .07);
    padding: 1.9rem;
    margin-bottom: 2.2rem;
}

.ffme-card.rouge { border-top-color: var(--ffme-rouge); }
.ffme-card.bleu-fonce { border-top-color: var(--ffme-bleu-fonce); }
.ffme-card.vert { border-top-color: var(--ffme-vert); }

.ffme-card-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 1.22rem;
    font-weight: 600;
    color: var(--ffme-noir);
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0 0 1.3rem;
}

.ffme-card-title .bi { color: var(--ffme-bleu-clair); font-size: 1.1em; }
.ffme-card.rouge .ffme-card-title .bi { color: var(--ffme-rouge); }
.ffme-card.vert .ffme-card-title .bi { color: var(--ffme-vert); }

/* ---------- Boutons FFME ---------- */

.btn-ffme,
.btn-ffme-light,
.btn-ffme-danger,
.btn-ffme-outline {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: 1px;
    border-radius: 3px;
    padding: .55rem 1.35rem;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
    transition: all .15s ease-in-out;
}

.btn-ffme {
    background: var(--ffme-bleu-fonce);
    border-color: var(--ffme-bleu-fonce);
    color: #fff;
}

.btn-ffme:hover,
.btn-ffme:focus {
    background: #fff;
    color: var(--ffme-bleu-fonce);
    border-color: var(--ffme-bleu-fonce);
}

.btn-ffme-light {
    background: var(--ffme-bleu-clair);
    border-color: var(--ffme-bleu-clair);
    color: #fff;
}

.btn-ffme-light:hover,
.btn-ffme-light:focus {
    background: #fff;
    color: var(--ffme-bleu-clair);
    border-color: var(--ffme-bleu-clair);
}

.btn-ffme-danger {
    background: var(--ffme-rouge);
    border-color: var(--ffme-rouge);
    color: #fff;
}

.btn-ffme-danger:hover,
.btn-ffme-danger:focus {
    background: #fff;
    color: var(--ffme-rouge);
    border-color: var(--ffme-rouge);
}

.btn-ffme-outline {
    background: transparent;
    border-color: var(--ffme-bleu-fonce);
    color: var(--ffme-bleu-fonce);
}

.btn-ffme-outline:hover,
.btn-ffme-outline:focus {
    background: var(--ffme-bleu-fonce);
    color: #fff;
}

.btn-ffme-sm {
    padding: .35rem .85rem;
    font-size: .68rem;
}

/* ---------- Formulaires ---------- */

.form-control,
.form-select {
    border-radius: 3px;
    border-color: #c6ccd2;
    font-size: .95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ffme-bleu-clair);
    box-shadow: 0 0 0 .2rem rgba(1, 161, 229, .16);
}

.form-label {
    font-weight: 600;
    font-size: .88rem;
    color: #3c4a57;
}

/* ---------- Tables ---------- */

.table-ffme {
    border: 1px solid var(--ffme-gris);
    margin-bottom: 0;
}

.table-ffme thead th {
    background: var(--ffme-bleu-fonce);
    color: #fff;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    letter-spacing: 1.6px;
    font-size: .85rem;
    border: none;
    padding: .7rem .95rem;
    white-space: nowrap;
}

.table-ffme tbody td {
    background: #fff;
    border-color: #e8eaec;
    vertical-align: middle;
    padding: .7rem .95rem;
    font-size: .93rem;
}

.table-ffme tbody tr:hover td { background: #eef7fd; }

.ffme-matos-img {
    height: 34px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

/* ---------- Badges FFME ---------- */

.badge-ffme {
    background: #e3f4fc;
    color: #0a6287;
    font-weight: 600;
    font-size: .75rem;
    padding: .45em .7em;
    border-radius: 3px;
}

.badge-ffme-fonce {
    background: var(--ffme-bleu-fonce);
    color: #fff;
    font-weight: 600;
    font-size: .75rem;
    padding: .45em .7em;
    border-radius: 3px;
}

.badge-ffme-vert {
    background: #e8f5e8;
    color: #1e6b24;
    font-weight: 600;
    font-size: .75rem;
    padding: .45em .7em;
    border-radius: 3px;
}

.badge-ffme-rouge {
    background: #fde7e9;
    color: #a90f1c;
    font-weight: 600;
    font-size: .75rem;
    padding: .45em .7em;
    border-radius: 3px;
}

/* ---------- Alertes ---------- */

.alert {
    border-radius: 4px;
    border: none;
    border-left: 4px solid transparent;
    font-size: .95rem;
}

.alert-primary { background: #e3f4fc; border-left-color: var(--ffme-bleu-clair); color: #07577c; }
.alert-success { background: #e9f7ec; border-left-color: #2e8b47; color: #1e5c2f; }
.alert-danger  { background: #fdeaea; border-left-color: var(--ffme-rouge); color: #9e0f1c; }
.alert-info    { background: #eef3f8; border-left-color: #5b7fa3; color: #24425e; }
.alert-warning { background: #fdf4e3; border-left-color: #c98a1b; color: #7a5310; }

/* ---------- Agenda / Calendrier ---------- */

.ffme-calendrier {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ffme-calendrier th {
    background: var(--ffme-bleu-fonce);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    font-size: .82rem;
    padding: .55rem .3rem;
    border: 1px solid #2a5290;
    text-align: center;
}

.ffme-calendrier td {
    border: 1px solid var(--ffme-gris);
    height: 112px;
    vertical-align: top;
    padding: 4px 5px;
    width: 14.2%;
    background: #fff;
}

.ffme-calendrier td.hors-mois { background: #f0f2f4; }

.ffme-calendrier .jour-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: var(--ffme-noir);
}

.ffme-calendrier td.aujourdhui { background: #eef7fd; }
.ffme-calendrier td.aujourdhui .jour-num {
    display: inline-block;
    background: var(--ffme-bleu-fonce);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
}

.evt-titre {
    display: block;
    margin: 4px 0 0;
    cursor: pointer;
    background: #e3f4fc;
    color: #07577c;
    border-left: 3px solid var(--ffme-bleu-clair);
    border-radius: 2px;
    padding: 2px 5px;
    font-size: .74rem;
    font-weight: 600;
    text-decoration: none;
}

.evt-titre:hover { background: #cdeaf9; color: #04384f; text-decoration: none; }

.evt-titre.complet {
    background: #fde7e9;
    color: #9e0f1c;
    border-left-color: var(--ffme-rouge);
}

.ffme-agenda-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.ffme-agenda-nav h1 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.7rem;
    color: var(--ffme-bleu-fonce);
    margin: 0;
}

/* ---------- Cartes propriétaires (matériel) ---------- */

.ffme-club-card {
    border: 1px solid var(--ffme-gris);
    border-left: 5px solid var(--ffme-bleu-fonce);
    border-radius: var(--ffme-radius);
    box-shadow: 0 2px 10px rgba(17, 22, 29, .06);
    margin-bottom: 1.8rem;
    overflow: hidden;
    background: #fff;
}

.ffme-club-header {
    background: var(--ffme-bleu-fonce);
    color: #fff;
    padding: .8rem 1.2rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 1.02rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ffme-club-header small {
    font-family: 'Open Sans', sans-serif;
    text-transform: none;
    letter-spacing: 0;
    color: #c9ddf5;
    font-size: .82rem;
}

.ffme-club-list { list-style: none; margin: 0; padding: 0; }

.ffme-club-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid #eceef0;
    font-size: .94rem;
}

.ffme-club-list li:last-child { border-bottom: none; }
.ffme-club-list li:hover { background: #f6fafd; }

/* ---------- Barre de filtres ---------- */

.ffme-filtres {
    background: #fff;
    border: 1px solid var(--ffme-gris);
    border-radius: var(--ffme-radius);
    padding: 1rem 1.2rem .35rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 8px rgba(17, 22, 29, .05);
}

/* ---------- Pages authentification ---------- */

.ffme-auth-body {
    min-height: 100vh;
    background: linear-gradient(rgba(17, 22, 29, .72), rgba(3, 55, 140, .8)), url('../images/backgrounddashboard.png') center/cover fixed no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1rem;
}

.ffme-auth-card {
    background: #fff;
    border-radius: var(--ffme-radius);
    border-top: 5px solid var(--ffme-rouge);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .4);
    padding: 2.3rem 2.5rem 2rem;
    width: 100%;
    max-width: 560px;
}

.ffme-auth-brand {
    text-align: center;
    margin-bottom: 1.4rem;
}

.ffme-auth-brand img { height: 60px; width: auto; }

.ffme-auth-brand .titre {
    display: block;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ffme-bleu-fonce);
    margin-top: .4rem;
}

.ffme-auth-brand .sous-titre {
    display: block;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ffme-bleu-clair);
}

/* ---------- Footer ---------- */

.ffme-footer {
    background: var(--ffme-noir);
    color: #fff;
    border-top: 4px solid var(--ffme-rouge);
    padding: 2.1rem 0 1.7rem;
    flex-shrink: 0;
}

.ffme-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    text-align: center;
}

.ffme-footer-label {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .8rem;
}

.ffme-footer-label::before {
    content: '';
    width: 24px;
    height: 4px;
    background: var(--ffme-rouge);
}

.ffme-footer p {
    color: #b9c2cb;
    margin: 0;
    font-size: .88rem;
}

.ffme-footer a {
    color: var(--ffme-bleu-clair);
    text-decoration: none;
    font-weight: 600;
}

.ffme-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Divers ---------- */

.ffme-muted { color: #6b7a88; font-size: .9rem; }

.ffme-text-rouge { color: var(--ffme-rouge); font-weight: 600; }

.bi { line-height: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .ffme-topbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: .3rem;
        padding-bottom: .6rem;
    }

    .ffme-brand { justify-content: center; }

    .ffme-nav {
        justify-content: center;
        gap: 1.1rem;
    }

    .ffme-nav a { padding: .45rem 0 .3rem; }

    .ffme-user { justify-content: center; }

    .ffme-hero { padding: 2.2rem 1.4rem 2rem; }

    .ffme-hero h1 { letter-spacing: 3px; }
}

@media (max-width: 767px) {
    .ffme-card { padding: 1.2rem 1rem; }
    .ffme-auth-card { padding: 1.6rem 1.2rem; }
    .ffme-calendrier td { height: 86px; }
    .evt-titre { font-size: .66rem; }
    .ffme-page-title { font-size: 1.5rem; }
}
