/* ------------------------------------ */
/*  RESET                               */
/* ------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* ------------------------------------ */
/*  BASE                                */
/* ------------------------------------ */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #222;
    background: #f7f7f7;

    /* sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 60px;  /* 70px = hauteur du menu */
}

/* ------------------------------------ */
/*  HERO / HEADER                       */
/* ------------------------------------ */
.hero {
    background: #0d1b34;
    text-align: center;

    /* même distance au-dessus et en dessous du logo */
    padding: 30px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo {
    display: block;
    margin: 0 auto;
}

.hero-logo {
    width: 320px;          
    max-width: 100%;
    margin: 0 auto 24px;
    display: block;
    filter: drop-shadow(0px 6px 20px rgba(0,0,0,0.25));
    animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ------------------------------------ */
/*  SECTIONS GÉNÉRALES                  */
/* ------------------------------------ */
.section,
.section-membres,
.section-tournois {
    padding: 60px 20px;
    background: #f7f7f7;
    text-align: center;
}

.section h2,
.section-membres h2,
.section-tournois h2 {
    font-size: 2rem;
    color: #0d1b34;
    margin-bottom: 20px;
}

.section p,
.section-membres p.section-subtitle {
    max-width: 700px;
    margin: auto;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #555;
}

/* ------------------------------------ */
/*  GRILLE + CARTES                     */
/* ------------------------------------ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1080px;
    margin: auto;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card p {
    margin: 0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.card h3 {
    color: #c62828;
    margin-bottom: 10px;
}

.card a {
    overflow-wrap: break-word;
    word-break: break-all;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    margin: 12px 0;

    /* Important : garde l’image complète */
    object-fit: contain;

    /* Optionnel : empêche qu’elle soit rognée */
    max-height: none;
}

.card .btn-download {
    margin-top: auto;
}

/* ------------------------------------ */
/*  TABLEAU MEMBRES                     */
/* ------------------------------------ */
.table-membres {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.table-membres th,
.table-membres td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table-membres th {
    background: #0d1b34;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

.table-membres tr:nth-child(even) td {
    background: #f7f7f7;
}

.table-membres tr:hover td {
    background: #e9f0ff;
}

/* ------------------------------------ */
/*  TABLEAU EQUIPES  (IDENTIQUE MEMBRES)*/
/* ------------------------------------ */
.table-equipes {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.table-equipes th,
.table-equipes td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table-equipes th {
    background: #0d1b34;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

.table-equipes tr:nth-child(even) td {
    background: #f7f7f7;
}

.table-equipes tr:hover td {
    background: #e9f0ff;
}

/* ------------------------------ */
/*  TABLEAUX MEMBRES + EQUIPES - RESPONSIVE  */
/* ------------------------------ */

@media (max-width: 768px) {

    .table-membres,
    .table-equipes {
        width: 100%;
        max-width: 600px;
        margin: 20px auto;
        border-collapse: separate;
        border-spacing: 0 12px;
        background: transparent;
        box-shadow: none;
    }

    .table-membres thead,
    .table-equipes thead {
        display: none;
    }

    .table-membres tr,
    .table-equipes tr {
        display: block;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border-radius: 8px;
        overflow: hidden;
    }

    .table-membres tr + tr,
    .table-equipes tr + tr {
        margin-top: 12px;
    }

    .table-membres td,
    .table-equipes td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 1px solid #eee;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .table-membres td:last-child,
    .table-equipes td:last-child {
        border-bottom: none;
    }

    .table-membres td::before,
    .table-equipes td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #777;
        margin-right: 10px;
        flex: 0 0 45%;
        max-width: 45%;
        text-align: left;
    }

    .table-membres td a,
    .table-equipes td a {
        word-break: break-word;
        text-align: right;
    }
}

/* ------------------------------------ */
/*  TABLEAU TOURNOIS FFE                */
/* ------------------------------------ */
.table-tournois {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.table-tournois th,
.table-tournois td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
}

.table-tournois th {
    background: #0d1b34;
    color: #fff;
    font-weight: 600;
}

.table-tournois tr:nth-child(even) td {
    background: #f7f7f7;
}

.table-tournois tr:hover td {
    background: #e9f0ff;
}

.table-tournois a {
    color: #c62828;
    text-decoration: none;
}

.table-tournois a:hover {
    text-decoration: underline;
}

/* ------------------------------ */
/*  TABLEAU TOURNOIS - RESPONSIVE */
/* ------------------------------ */

@media (max-width: 768px) {
    .table-tournois {
        width: 100%;
        max-width: 600px;
        margin: 20px auto;
        border-collapse: separate;
        border-spacing: 0 12px;
        background: transparent;
        box-shadow: none;
    }

    .table-tournois thead {
        display: none;
    }

    .table-tournois tr {
        display: block;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border-radius: 8px;
        overflow: hidden;
    }

    .table-tournois tr + tr {
        margin-top: 12px;
    }

    .table-tournois td {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 10px;
        border-bottom: 1px solid #eee;
        padding: 8px 12px;
        font-size: 0.9rem;
        text-align: left;
    }

    .table-tournois td:last-child {
        border-bottom: none;
    }

    .table-tournois td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #777;
        margin-right: 10px;
        flex: 0 0 45%;
        max-width: 45%;
        text-align: left;
    }

    .table-tournois td a {
        word-break: break-word;
        text-align: left;
    }

    .table-tournois tr:nth-child(even) td {
        background: transparent;
    }

    .table-tournois tr:hover td {
        background: transparent;
    }
}

/* ------------------------------------ */
/*  TEXTES D'INFO / ERREURS / PETITS    */
/* ------------------------------------ */
.info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
}

.small {
    font-size: 0.85rem;
    color: #777;
}

.small-center {
    text-align: center;
    margin-top: 15px;
}

.erreur {
    color: #c62828;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
}

/* ------------------------------------ */
/*  FOOTER                              */
/* ------------------------------------ */
footer {
    background: #0d1b34;
    color: #fff;
    padding: 18px 10px;
    text-align: center;
    margin-top: auto;
}

/* Ligne unique centrée */
.footer-line {
    display: flex;
    justify-content: center;       /* tout est centré */
    align-items: center;           /* alignement vertical */
    gap: 14px;                     /* espace entre les éléments */
    flex-wrap: wrap;               /* permet le retour à la ligne sur mobile */
}

/* Texte "©" */
.footer-left {
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Texte "Suivez-nous…" */
.footer-text {
    white-space: nowrap;
    font-size: 0.95rem;
}

/* ------------------------------------ */
/*  TOURNOIS.PHP - LIENS CENTRÉS        */
/* ------------------------------------ */

.section-home-links {
    padding: 60px 20px;
    text-align: center;
    background: #f7f7f7;
}

.section-home-links h2 {
    font-size: 2rem;
    color: #0d1b34;
    margin-bottom: 40px;
}

.home-links-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.home-link-card {
    display: block;
    background: #ffffff;
    padding: 25px 40px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0d1b34;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.home-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    background: #e9f0ff;
}

/* Responsive */
@media (max-width: 768px) {
    .home-link-card {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
        padding: 20px;
        font-size: 1.1rem;
    }
}

.timeline-chess {
    max-width: 700px;
    margin: 0 auto;
    padding-left: 25px;
    border-left: 3px solid #0d1b34;
    text-align: left;
}

.timeline-chess div {
    margin-bottom: 30px;
}

@media (min-width: 1100px) {
    .timeline-chess {
        padding-left: 40px;
    }
}

.photo-club-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.photo-club-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Réduction globale hauteur mobile */
@media (max-width: 768px) {

    .table-membres td,
    .table-tournois td,
    .table-equipes td {
        padding: 6px 10px !important;
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .table-membres td::before,
    .table-tournois td::before,
    .table-equipes td::before {
        font-size: 0.75rem;
        margin-right: 6px;
    }

    .table-membres tr,
    .table-tournois tr,
    .table-equipes tr {
        margin-bottom: 8px;
    }
}

/* ------------*/
/*  BIBLI.PHP  */
/* ------------*/
.btn-download {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #c62828;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s ease;
}

.btn-download:hover {
    background: #a61f1f;
    transform: translateY(-1px);
}


/* ------------------------------------ */
/*  ICONES RESEAUX SOCIAUX              */
/* ------------------------------------ */
.social-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0 12px;
}

/* Texte avant les icônes */
.social-text {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #fff;
}

/* Ligne d’icônes */
.social-links {
    display: flex;
    gap: 12px;
}

.social-links img {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.social-links a:hover img {
    transform: scale(1.1);
}

/* Responsive : inverser l’ordre sur mobile */
@media (max-width: 600px) {
    .footer-line {
        flex-direction: column;
    }

    .footer-text,
    .social-links {
        order: 1;   /* le texte + les icônes passent en premier */
    }

    .footer-left {
        order: 2;   /* le © passe en dessous */
    }
}

/* SECTION RESEAUX SOCIAUX */
.social-block {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-card {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #0d1b34;
    font-size: 1.1rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.social-card img {
    width: 34px;
    height: 34px;
    transition: 0.2s ease;
}

.social-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.social-card:hover img {
    transform: scale(1.15);
}

/* Réduit l'espace avant la section réseaux sociaux */
#reseaux.section {
    padding-top: 0px;   /* au lieu de 60px */
    padding-bottom: 80px;
}

/* ========================= */
/*  PAGE ACTUS               */
/* ========================= */

.actus-list {
    width: 90%;
    max-width: 1100px;       /* limite propre sur grands écrans */
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.actus-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: left;
}

/* Titre */
.actus-item h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #0d1b34;
}

/* Date */
.actus-item .small {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

/* IMAGE BEAUCOUP PLUS PETITE */
.actus-item img {
    width: 280px;        /* -> taille désirée */
    height: auto;
    float: right;        /* image à droite */
    margin: 0 0 10px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Texte */
.actus-item p {
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 700px) {
    .actus-item img {
        float: none;
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
}

/* ------------------------------------ */
/*  ANIMATIONS LEGERES                  */
/* ------------------------------------ */
.section-actus {
    padding: 50px 20px;
    background: #f7f7f7;
}

.section-actus h2 {
    text-align: left;
    max-width: 1100px;
    margin: 0 auto 24px;
    color: #0d1b34;
}
.home-actus {
    padding-top: 20px;
}
.home-actus h2 {
    text-align: center;
    margin-top: 0;
}
#infos {
    padding-top: 20px;
}

.news-featured {
    max-width: 1100px;
    margin: 0 auto 36px;
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) 1fr;
    gap: 24px;
    align-items: center;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.news-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-featured-content {
    padding: 18px;
    text-align: left;
}

.news-featured-content h3 {
    font-size: 1.8rem;
    margin: 8px 0 10px;
    color: #0d1b34;
}

.news-featured-content p {
    line-height: 1.6;
    color: #444;
}

.news-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.12);
}

.news-card-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 16px;
    text-align: left;
}

.news-card-body h4 {
    font-size: 1.25rem;
    margin: 6px 0 10px;
    color: #0d1b34;
}

.news-card-body p {
    line-height: 1.5;
    color: #444;
}

.news-card .small,
.news-featured .small {
    font-size: 0.9rem;
    color: #777;
}

@media (max-width: 900px) {
    .news-featured {
        grid-template-columns: 1fr;
    }
}

.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.enhance-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.enhance-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.img-fade {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.enhance-ready .img-fade {
    opacity: 0;
}

.enhance-ready .img-fade.img-loaded {
    opacity: 1;
}

/* ------------------------------------ */
/*  BARRE RAFRAICHIR                    */
/* ------------------------------------ */
.refresh-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px auto 20px;
    width: 100%;
    max-width: 1000px;
    padding: 0 10px;
}

.refresh-bar {
    display: flex;
    justify-content: flex-start;
}

.btn-refresh {
    background: #1b2f56;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: 0.2s ease;
}

.btn-refresh:hover {
    transform: translateY(-1px);
    background: #24406f;
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: wait;
}

.filter-bar {
    display: flex;
    justify-content: flex-end;
}

.filter-input {
    width: min(320px, 90%);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}
.filter-select {
    width: 220px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background: #fff;
}
