:root {
    --navy: #0b2545;
    --navy-dark: #071a33;
    --orange: #f28c1c;
    --orange-dark: #d9760b;
    --gris-clair: #f4f6f9;
    --texte: #1e2a3a;
    --succes: #1e8e3e;
    --danger: #d93025;
    --attente: #b8860b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--gris-clair);
    color: var(--texte);
}

/* --- Barre de navigation --- */
.navbar {
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    flex-wrap: wrap;
}
.navbar .brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.navbar .brand .logo-navbar {
    height: 34px;
    width: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}
.navbar .brand span.accent { color: var(--orange); }
.navbar nav a {
    color: #dfe7f2;
    text-decoration: none;
    margin-left: 1.3rem;
    font-size: 0.95rem;
}
.navbar nav a:hover { color: var(--orange); }
.navbar .user-pill {
    background: var(--orange);
    color: var(--navy-dark);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 1.3rem;
}

/* --- Conteneur principal --- */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.page-title {
    color: var(--navy);
    border-left: 5px solid var(--orange);
    padding-left: 0.8rem;
    margin-bottom: 1.5rem;
}

/* --- Cartes --- */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(11,37,69,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h3 { margin-top: 0; color: var(--navy); }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.92rem;
}
.btn-primary { background: var(--orange); color: var(--navy-dark); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-dark); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

/* --- Formulaires --- */
label { display: block; font-weight: 600; margin: 0.7rem 0 0.3rem; color: var(--navy); }
input, select, textarea {
    width: 100%;
    padding: 0.55rem;
    border: 1px solid #cdd6e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(242,140,28,0.15);
}
form .btn { margin-top: 1.2rem; }

/* --- Tableaux --- */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 0.65rem 0.8rem; text-align: left; border-bottom: 1px solid #e5e9f0; font-size: 0.92rem; }
th { background: var(--navy); color: #fff; }
tr:hover td { background: #f8fafc; }

/* --- Badges de statut --- */
.badge { padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.78rem; font-weight: 700; }
.badge-validee, .badge-present { background: #e6f4ea; color: var(--succes); }
.badge-refusee, .badge-absent { background: #fce8e6; color: var(--danger); }
.badge-en_attente { background: #fdf0d5; color: var(--attente); }

/* --- Stats --- */
.stat-box { text-align: center; }
.stat-box .valeur { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-box .libelle { color: #667; font-size: 0.85rem; }

.barre-progression { background: #e5e9f0; border-radius: 20px; overflow: hidden; height: 10px; margin-top: 0.4rem; }
.barre-progression .remplissage { background: var(--orange); height: 100%; }

.alerte { padding: 0.8rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alerte-succes { background: #e6f4ea; color: var(--succes); }
.alerte-erreur { background: #fce8e6; color: var(--danger); }

footer { text-align: center; padding: 1.5rem; color: #8a97a8; font-size: 0.82rem; }

/* --- Formulaire d'inscription étudiant --- */
.form-inscription {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 10px 34px rgba(11,37,69,0.1);
    border: 1px solid #eef1f6;
    position: relative;
    overflow: hidden;
    padding-top: 2rem !important;
}
.form-inscription::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--navy), var(--orange));
}
.form-columns { display: grid; grid-template-columns: 1fr 220px; gap: 2rem; align-items: start; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 800;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 0.5rem;
    margin: 2rem 0 0.9rem;
}
.section-title::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--orange);
    flex-shrink: 0;
}
.section-title:first-child { margin-top: 0; }

.form-col-photo { text-align: center; }
.photo-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    border: 2px dashed #cdd6e0;
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 0.2s;
}
.photo-upload-zone:hover { border-color: var(--orange); }
.photo-upload-zone.photo-chargee { border-color: var(--succes); border-style: solid; background: #f3faf5; }
.photo-upload-zone img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--orange);
    background: #f4f6f9;
}
.photo-upload-zone span { color: var(--navy); font-weight: 600; font-size: 0.85rem; }

@media (max-width: 700px) {
    .form-columns { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
}

/* --- Section héro / carrousel des clubs --- */
.hero-clubs {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}
.hero-clubs-fond {
    background: linear-gradient(160deg, #f4f6f9 0%, #eaf0f8 60%, #fdf2e6 100%);
    border-radius: 22px;
    padding: 3rem 1.5rem 2.5rem;
    margin-top: 1rem;
}
.hero-clubs-fond-sport {
    background: linear-gradient(160deg, #eaf0f8 0%, #dde8f5 60%, #f4f6f9 100%);
    margin-top: 2.5rem;
}
.hero-clubs-fond-sport .accent { color: #1565c0; }
.hero-clubs-fond-sport .hero-kicker { color: #1565c0; }
.hero-clubs-fond-sport .btn-cta-hero {
    background: linear-gradient(135deg, #1565c0, var(--navy));
    box-shadow: 0 10px 24px rgba(21,101,192,0.35);
}
.hero-clubs-fond-sport .btn-cta-hero:hover {
    box-shadow: 0 14px 30px rgba(21,101,192,0.45);
}
.compteur-visites {
    text-align: center;
    color: #a0aab8;
    font-size: 0.82rem;
    margin: 2rem 0 0.5rem;
}

.banniere-domaine-formulaire {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    padding: 1.1rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1.2rem;
}
.banniere-domaine-formulaire span { font-size: 1.8rem; }
.banniere-domaine-culture { background: linear-gradient(120deg, var(--orange), var(--orange-dark)); }
.banniere-domaine-sport { background: linear-gradient(120deg, #1565c0, var(--navy)); }

.grille-graphiques {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
}
.grille-graphiques .card { min-height: 320px; }
.conteneur-graphique { position: relative; height: 260px; }

.grille-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.carte-photo-etudiant {
    background: #f4f6f9;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    border: 1px solid #e5e9f0;
}
.carte-photo-etudiant img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.carte-photo-infos { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.15rem; }
.carte-photo-infos strong { color: var(--navy); font-size: 0.88rem; }
.photo-manquante {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #fdf0de;
    color: #b8860b;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}
.btn-cta-hero {
    display: inline-block;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 0.9rem 2.2rem;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(242,140,28,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-cta-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(242,140,28,0.45);
}
.hero-kicker {
    display: inline-block;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.hero-titre {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 0.6rem;
    line-height: 1.1;
}
.hero-titre .accent { color: var(--orange); }
.hero-sous-titre {
    color: #55627a;
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 0.4rem;
}
.hero-note {
    color: #8894a8;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.carousel-section { margin: 1.8rem 0 2.5rem; }
.carousel-titre {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 1rem;
    padding-left: 0.2rem;
}
.carousel-titre .puce { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); display: inline-block; }

.carousel-wrap { position: relative; }
.carousel-track {
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.4rem 0.2rem 1.2rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-card {
    position: relative;
    flex: 0 0 auto;
    width: 250px;
    height: 330px;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 8px 24px rgba(11,37,69,0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
    display: block;
    background: linear-gradient(160deg, var(--navy) 0%, #163a63 60%, var(--orange) 130%);
}
.carousel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 34px rgba(11,37,69,0.3);
}
.carousel-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-card .voile {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,37,69,0) 35%, rgba(6,20,38,0.92) 100%);
}
.carousel-card .lettre-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.18);
}
.carousel-card .contenu {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.1rem 1rem;
    color: #fff;
}
.carousel-card .nom-club {
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.6rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.carousel-card .btn-rejoindre {
    display: inline-block;
    background: var(--orange);
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
}
.carousel-card:hover .btn-rejoindre { background: #fff; }
.carousel-card .badge-genre {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: rgba(255,255,255,0.92);
    color: var(--navy);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(11,37,69,0.85);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.carousel-arrow:hover { background: var(--orange); color: var(--navy-dark); }
.carousel-arrow.gauche { left: -6px; }
.carousel-arrow.droite { right: -6px; }
@media (max-width: 700px) { .carousel-arrow { display: none; } }

.bientot-carte {
    flex: 0 0 auto;
    width: 250px;
    height: 330px;
    border-radius: 16px;
    border: 2px dashed #cdd6e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    color: #8894a8;
    text-align: center;
    padding: 1rem;
}

/* --- Choix d'espace (page de connexion) --- */
.espace-choix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    max-width: 620px;
    margin: 1.5rem auto 0;
}
@media (max-width: 600px) { .espace-choix { grid-template-columns: 1fr; } }
.carte-espace {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 2.2rem 1.2rem;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 10px 26px rgba(11,37,69,0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.carte-espace:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(11,37,69,0.3); }
.carte-espace-culture { background: linear-gradient(150deg, var(--navy), #1c4a7d); }
.carte-espace-sport { background: linear-gradient(150deg, var(--orange-dark), var(--orange)); }
.carte-espace-icone { font-size: 2.6rem; }
.carte-espace-nom { font-size: 1.3rem; font-weight: 800; }
.carte-espace-desc { font-size: 0.85rem; opacity: 0.9; }

/* --- Mini zone photo (formulaire création club) --- */
.mini-photo-zone { margin-bottom: 0.6rem; }
.mini-photo-drop {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border: 2px dashed #cdd6e0;
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.mini-photo-drop:hover { border-color: var(--orange); }
.mini-photo-drop img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f4f6f9; }
.mini-photo-drop span { font-size: 0.85rem; color: var(--navy); font-weight: 600; }

/* --- Grille des clubs (admin) avec miniatures photo esthétiques --- */
.grille-clubs-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}
.carte-club-admin {
    display: flex;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    padding: 0.8rem;
    align-items: flex-start;
}
.miniature-club {
    position: relative;
    flex: 0 0 auto;
    width: 78px;
    height: 78px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(150deg, var(--navy), var(--orange));
    display: block;
}
.miniature-club img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniature-lettre {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: rgba(255,255,255,0.75);
    font-size: 2rem; font-weight: 800;
}
.miniature-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11,37,69,0.75);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.miniature-club:hover .miniature-overlay { opacity: 1; }
.carte-club-admin-infos {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}
.carte-club-admin-infos strong { color: var(--navy); font-size: 1rem; }

.details-responsable {
    margin-top: 0.4rem;
    font-size: 0.85rem;
}
.details-responsable summary {
    cursor: pointer;
    color: var(--orange-dark);
    font-weight: 700;
    list-style: none;
}
.details-responsable summary::-webkit-details-marker { display: none; }
.details-responsable[open] summary { margin-bottom: 0.3rem; }

/* --- Sélection multiple de clubs (formulaire d'inscription) --- */
.grille-choix-clubs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}
.case-club {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f4f6f9;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.case-club:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(11,37,69,0.08); }
.case-club:has(input:checked) {
    background: linear-gradient(135deg, #fdf0de, #fce4c6);
    border-color: var(--orange);
    box-shadow: 0 4px 14px rgba(242,140,28,0.18);
}
.case-club input { width: auto; margin: 0; }

/* --- Boutons Présent/Absent (appel) --- */
.toggle-presence { display: flex; gap: 0.5rem; }
.bouton-presence {
    cursor: pointer;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    border: 2px solid #cdd6e0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #667;
    background: #fff;
    transition: all 0.15s;
    user-select: none;
}
.bouton-present.actif { background: #e6f4ea; border-color: var(--succes); color: var(--succes); }
.bouton-absent.actif { background: #fce8e6; border-color: var(--danger); color: var(--danger); }

/* --- Tableau de bord esthétique (bannière + cartes à icônes) --- */
.banniere-tdb {
    background: linear-gradient(120deg, var(--orange) 0%, var(--orange-dark) 35%, var(--navy) 100%);
    border-radius: 20px;
    padding: 2.2rem 2rem;
    color: #fff;
    margin-bottom: 1.6rem;
    box-shadow: 0 12px 28px rgba(11,37,69,0.22);
}
.banniere-tdb h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.3rem;
}
.banniere-tdb p { margin: 0; opacity: 0.92; font-size: 1rem; }

.grille-stats-icones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.6rem;
}
.stat-icone-carte {
    background: #fff;
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(11,37,69,0.08);
}
.stat-icone-carte .icone {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-icone-carte .texte .valeur { font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-icone-carte .texte .libelle { font-size: 0.82rem; color: #667; margin-top: 0.15rem; }

.icone-orange { background: #fdeee0; color: var(--orange-dark); }
.icone-vert   { background: #e2f5ea; color: #1e8e3e; }
.icone-bleu   { background: #e3edfb; color: var(--navy); }
.icone-violet { background: #ece3fb; color: #6b3fd4; }

.grille-actions-rapides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.action-rapide-carte {
    background: #fff;
    border-radius: 14px;
    padding: 1.2rem 1rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(11,37,69,0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid #eef1f6;
}
.action-rapide-carte:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(11,37,69,0.14); }
.action-rapide-carte .icone-action { font-size: 1.7rem; display: block; margin-bottom: 0.4rem; }
.action-rapide-carte .nom-action { font-weight: 700; color: var(--navy); font-size: 0.92rem; }
.action-rapide-carte.mise-en-avant { background: linear-gradient(135deg, var(--navy), #1c4a7d); }
.action-rapide-carte.mise-en-avant .nom-action { color: #fff; }
