* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #111111;
}

.container {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 45px;
}

.logo {
    display: block;
    width: 180px;
    max-width: 70%;
    height: auto;
    margin: 0 auto 25px;
}

h1 {
    margin: 0 0 20px;
    font-size: 32px;
    font-weight: 800;
    color: #111111;
}

.sync {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #777777;
    font-size: 14px;
}

.sync strong {
    color: #111111;
    font-size: 15px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    display: block;
    background: #ffffff;
    border-radius: 20px;
    padding: 45px 25px 30px;
    text-align: center;
    text-decoration: none;
    color: #111111;
    border-top: 6px solid #c40000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.card-icon {
    font-size: 55px;
    margin-bottom: 20px;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #111111;
}

.count {
    font-size: 18px;
    font-weight: bold;
    color: #c40000;
    margin-bottom: 30px;
}

.card-button {
    display: inline-block;
    background: #c40000;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
}

@media (max-width: 650px) {

    .container {
        padding: 30px 15px;
    }

    .logo {
        width: 140px;
    }

    h1 {
        font-size: 26px;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 30px 20px 25px;
    }

    .card-icon {
        font-size: 45px;
    }
}

/* ==============================
   PAGE DE CONNEXION
============================== */

.login-container {
    width: 100%;
    max-width: 450px;
    margin: 30px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    text-align: center;
    border-top: 6px solid #c40000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
}

.logo-link {
    display: inline-block;
}

.login-container .logo {
    width: 140px;
    margin-bottom: 20px;
}

.login-container h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.login-description {
    color: #777777;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 10px;
}

.login-form label {
    font-size: 14px;
    font-weight: bold;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.login-form input[type="password"]:focus {
    border-color: #c40000;
}

.login-form button {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: #c40000;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-form button:hover {
    background: #990000;
}

.error-message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #ffe8e8;
    color: #b00000;
    font-weight: bold;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    color: #555555;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #c40000;
}

@media (max-width: 500px) {

    .login-container {
        margin: 10px auto;
        padding: 30px 20px;
    }
}

/* ==============================
   PAGE GROUPES
============================== */

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header .logo {
    width: 140px;
}

.section-header h1 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.section-description {
    color: #777777;
    font-size: 16px;
}

.groupes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.groupe-card {
    display: block;
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: #111111;
    border-top: 5px solid #c40000;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.groupe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 25px rgba(0, 0, 0, 0.14);
}

.groupe-icon {
    font-size: 35px;
    margin-bottom: 15px;
}

.groupe-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.groupe-card p {
    margin: 0;
    color: #c40000;
    font-weight: bold;
}

.section-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.secondary-button,
.logout-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

.secondary-button {
    background: #ffffff;
    color: #111111;
    border: 1px solid #dddddd;
}

.logout-button {
    background: #111111;
    color: #ffffff;
}

.empty-message {
    background: #ffffff;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
}

@media (max-width: 800px) {

    .groupes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 500px) {

    .groupes-grid {
        grid-template-columns: 1fr;
    }

    .section-actions {
        flex-direction: column;
    }

    .secondary-button,
    .logout-button {
        text-align: center;
    }

}

/* ==============================
   LISTE DES ADHÉRENTS
============================== */

.section-name {
    margin: 0 0 5px;
    color: #c40000;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.adherents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 750px;
    margin: 0 auto;
}

.adherent-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 14px;
    border-left: 5px solid #c40000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.adherent-info {
    text-align: left;
}

.adherent-name {
    font-size: 18px;
    color: #111111;
}

.adherent-name strong {
    font-weight: 800;
}

.adherent-group {
    margin-top: 5px;
    color: #777777;
    font-size: 13px;
}

.pdf-button {
    display: inline-block;
    padding: 11px 20px;
    background: #c40000;
    color: #ffffff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.pdf-button:hover {
    background: #990000;
}

.no-pdf {
    color: #999999;
    font-size: 13px;
    font-style: italic;
}

@media (max-width: 600px) {

    .adherent-card {
        flex-direction: column;
        align-items: stretch;
    }

    .adherent-action {
        width: 100%;
    }

    .pdf-button {
        display: block;
        width: 100%;
        text-align: center;
    }

}