/* ------------------------------ */
/* BASE GLOBALE */
/* ------------------------------ */

* {
    box-sizing: border-box;
}

/* Structure globale pour footer collé en bas */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;

    /* Ton style EVIR existant */
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.page-content {
    flex: 1;              /* Pousse le footer vers le bas */
    display: flex;
    justify-content: flex-start; /* PAS stretch */
}

main {
    max-width: 60rem;        /* ≈ 960px mais responsive */
    width: 95%;
    margin: 2rem auto;
    padding: 1.25rem;

    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.08);
}
main.large { /* Pour quand il y a des tableaux */
    max-width: 1920px; 
    width: 100%; 
    margin: 0 auto;
    padding-left: 5 px;
    padding-right: 5 px;
    padding-bottom: 5 px;
    padding-top: 0;
}

/* ------------------------------ */
/* Header */
/* ------------------------------ */
.header {
    background-color: #ffffff;
    border-bottom: 2px solid #d65050;
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1100px;
    width: 95%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header, nav, .site-menu {
    position: relative;
    z-index: 9999;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 700;
    color: #d65050;
    text-decoration: none;
}

/* MENU */
.menu a, .submenu a { 
    text-decoration: none !important;  
}
.menu > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
}

.menu a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
}

.menu a:hover {
    background-color: #d65050;
    color: white;
}

.menu > ul > li > a {
    white-space: nowrap;
}

/* --- SOUS-MENUS --- */

/* Le parent doit être en position relative pour que le sous-menu se place par rapport à lui */
.has-submenu {
    position: relative;
}

/* Sous-menu : caché et positionné en colonne par défaut */
.submenu {
    display: none;             /* Caché par défaut */
    position: absolute;
    top: calc(100% + 5px);                 /* Se place juste en dessous du texte parent */
    left: 0;
    background: white;
    border: 1px solid #ddd;
    padding: 5px 0;
    list-style: none;
    min-width: 220px;          /* Largeur minimale pour éviter les textes coupés */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    
    /* Force l'affichage en colonne pour que les items soient l'un sous l'autre */
    flex-direction: column; 
}

/* On force les éléments du sous-menu à ne pas hériter du "display: flex" horizontal du menu principal */
.submenu li {
    width: 100%;
    display: block;
}

/* Affichage au survol du parent */
.has-submenu:hover .submenu {
    display: flex; /* Utilise flex pour l'alignement interne si besoin, ou "block" */
}

/* Style des liens dans le sous-menu */
.submenu li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.submenu li a:hover {
    background-color: #d65050;
    color: white !important; /* Force le blanc au survol */
}

/* Déconnexion */
.logout-btn {
    background-color: #d65050;
    color: white !important;
}

.logout-btn:hover {
    background-color: #b33f3f;
}


.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: 0.3s;
}

/* ------------------------------ */
/* TITRES */
/* ------------------------------ */

h1, h2, h3 {
    font-weight: 600;
    color: #222;
    margin-bottom: 15px;
}





/* ------------------------------ */
/* FORMULAIRES */
/* ------------------------------ */

/* Style général pour toutes les checkbox */
input, button, select {
	vertical-align: middle;
}
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d65050;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background-color: white;
    transition: all 0.2s ease;
    margin-bottom: 20px; /* espace sous la checkbox */
}

/* Effet au survol */
input[type="checkbox"]:hover {
    border-color: #b33f3f;
}

/* Checkbox cochée */
input[type="checkbox"]:checked {
    background-color: #d65050;
    border-color: #d65050;
}

/* Petit check blanc */
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label { 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

.switch-label {
    display: inline-block;
    width: auto;
}


label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

input,
select {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: #222;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    box-sizing: border-box; 
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    border-color: #d65050;         /* Accent EVIR */
    outline: none;
    box-shadow: 0 0 4px rgba(214, 80, 80, 0.4);
}

/* Style général pour les champs désactivés */
input[disabled],
select[disabled],
textarea[disabled] {
    background-color: #f2f2f2;   /* plus clair */
    color: #777;                 /* texte grisé */
    border-color: #ccc;          /* bordure adoucie */
    cursor: not-allowed;         /* curseur explicite */
    opacity: 1;                  /* éviter le fade automatique de certains navigateurs */
}

/* Optionnel : style des options dans un select disabled */
select[disabled] option {
    color: #555;
}

/* Optionnel : effet visuel subtil */
input[disabled],
select[disabled],
textarea[disabled] {
    box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}

select[disabled]::after,
input[disabled]::after {
    content: "🔒";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Style champs readonly comme disabled */
input[readonly],
textarea[readonly],
select[readonly] {
    background-color: #f2f2f2;
    color: #777;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 1;
}

/* Empêcher focus visuel agressif */
input[readonly]:focus,
textarea[readonly]:focus,
select[readonly]:focus {
    outline: none;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}

/* Optionnel : icône cadenas */
.readonly-lock {
    position: relative;
}

.readonly-lock::after {
    content: "🔒";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    opacity: 0.6;
    pointer-events: none;
}


/* Sections de formulaire */

.form-section {
    background: #fff;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 6px;
}

.subsection {
    background: #fafafa;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.subsection h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #444;
}

/* Pour sections repliées */
.section-title {
    cursor: pointer;
    user-select: none;
    padding: 10px 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3em;
}

/* Chevron visible partout */
.section-title::before {
    content: "►";
    font-family: Arial, sans-serif; /* police sûre */
    font-size: 0.9em;
    transition: transform 0.2s ease;
    color: #444;
}

/* Chevron tourné quand ouvert */
.section-title.open::before {
    transform: rotate(90deg);
}

/* Contenu masqué par défaut */
.section-content {
    display: none;
    padding-top: 10px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0 }
    to   { opacity: 1 }
}




/* On neutralise les marges globales dans ce conteneur */
.form-actions button,
.form-actions a {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* On s'assure que le lien ressemble bien à un bouton */
.form-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.left-actions {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
}

.right-actions {
    display: flex;
    gap: 10px;
}



/* Messages d’erreur */
.error {
    display: block;
    margin-top: -10px;
    margin-bottom: 10px;
    color: #d65050;                /* Rouge EVIR */
    font-style: italic;
    font-size: 0.9rem;
}
.input-error {
    border: 2px solid #e74c3c !important;
    background-color: #fdecea !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}


/* ------------------------------ */
/* BOUTONS */
/* ------------------------------ */

button,
form button {
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    background-color: #d65050;     /* Rouge EVIR */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
    margin-bottom: 20px;
}

button:hover,
form button:hover {
    background-color: #b33f3f;
}

/* Bouton principal (Enregistrer) */
.btn-primary {
    padding: 10px 18px;
    background-color: #d65050;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #b33f3f;
}

/* Bouton secondaire (Annuler) */
.btn-secondary {
    padding: 10px 18px;
    background-color: #f0f0f0;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    text-decoration: none; /* important pour les <a> */
    display: inline-block; /* pour que ça ressemble à un bouton */
}

.btn-secondary:hover {
    background-color: #e6e6e6;
    border-color: #bbb;
}

.btn-danger { 
    background: #c62828; 
    color: white; 
    padding: 10px 18px; 
    border-radius: 6px; 
    border: none; 
    cursor: pointer; 
} 

.btn-danger:hover { 
    background: #b71c1c; 
}

.btn-delete { 
    background: #d32f2f; 
    color: white; 
    padding: 10px 18px; 
    border-radius: 6px; 
    border: none; 
    cursor: pointer; 

} 

.btn-delete:hover { 
    background: #b71c1c; 
}

/* Toggle */
.toggle-valid {
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.toggle-valid.on {
    background: #4caf50;
    color: white;
}

.toggle-valid.off {
    background: #ccc;
    color: #333;
}

/* Conteneur des boutons */
.mode-toggle {
    display: flex;
    gap: 8px;              /* espace entre les boutons */
    align-items: center;
}

.mode-btn {
    padding: 6px 12px;
    border: 1px solid #666666;   /* gris EVIR */
    background: #f5f5f5;         /* gris très clair */
    color: #666666;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;       /* évite la superposition */
    white-space: nowrap;         /* évite les retours bizarres */
}

.mode-btn.active {
    background: #D65050;         /* rouge EVIR */
    border-color: #D65050;
    color: white;
}



/* ------------------------------ */
/* LIENS */
/* ------------------------------ */

a {
    color: #d65050;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

/* ------------------------------ */
/* TABLEAUX */
/* ------------------------------ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #f0f0f0;
    font-weight: 600;
}


/* ------------------------------ */
/* ALERTES */
/* ------------------------------ */

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 1rem;
}

.alert-success {
    background-color: #e8f9ef;
    border-left: 5px solid #2ecc71;
}

.alert-danger {
    background-color: #fdeaea;
    border-left: 5px solid #e74c3c;
}


/* ------------------------------ */
/* RESPONSIVE */
/* ------------------------------ */

@media (max-width: 600px) {

    main {
        margin: 10px auto;
        padding: 15px;
    }

    form input,
    form select {
        padding: 12px;
    }

    button,
    form button {
        width: 100%;
        padding: 14px;
        font-size: 1.1rem;
    }

    table th,
    table td {
        padding: 8px;
        font-size: 0.9rem;
    }
}

/* ------------------------------ */
/* FOOTER */
/* ------------------------------ */

.footer {
    background-color: #ffffff;
    border-top: 2px solid #d65050;
    margin-top: auto;
    padding: 20px 0;
    color: #333;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1100px;
    width: 95%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    height: 30px;
    width: auto;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-right a {
    color: #d65050;
    text-decoration: none;
    font-weight: 600;
}

.footer-right a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.85rem;
}

/* ------------------------------ */
/* Login */
/* ------------------------------ */

/* Pas d'ascenseur */
.login_body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* Fond photo plein écran */
.login_body {
    background:
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
        url("https://evir.ch/wp-content/uploads/2025/12/DSC_0084-scaled.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
}

/* Conteneur centré verticalement */
.login-container {
    height: calc(100vh - 70px); /* laisse la place pour le footer */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: none
}

/* Card minimaliste */
.login-card {
    background: rgba(255, 255, 255, 0.90);
    padding: 2.5rem 3rem;
    border-radius: 14px;
    box-shadow: 0 5px 15px #d65050;
    max-width: 420px;
    width: 100%;
    text-align: center;

    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.8s ease-out forwards;
}

/* Animation */
@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.login-logo {
    width: 90px;
    margin-bottom: 1rem;
}

.logo-img { /* Logo dans le header */
    max-width: 70px;
    width: 100%;
    height: auto;
}



/* Titres */
.login-card h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #222;
}

.login-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #444;
}

/* Champs */
.login-card input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

/* Bouton */
.btn-login {
    width: 100%;
    padding: 12px;
    margin-top: 1rem;
    background: #d65050;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-login:hover {
    background: #d65050;
}

/* Message d'erreur */
.alert-danger {
    margin-top: 1rem;
    padding: 10px;
    background: #ffdddd;
    border-left: 4px solid #d9534f;
    color: #a94442;
    border-radius: 4px;
}



/* ------------------------------ */
/* DataTables */
/* ------------------------------ */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* espace entre les éléments */
}

.dt-top .dt-length,
.dt-top .dt-search,
.dt-top .dt-reset {
    display: flex;
    align-items: center;
    margin-top: 0;
    
}
.dt-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.dt-length {
    justify-self: start;
}

.dt-search {
    justify-self: center;
}

.dt-reset {
    justify-self: end;
}

.dt-search input .dt-search label .dt-length {
    margin-top: 0;
    margin-bottom: 10px
}

.dt-reset-btn {
   line-height: 1.1;
   margin-top: 5 px;
   margin-bottom: 10px; 
}

.dataTables_wrapper,
.dt-container {
    position: relative;
    z-index: 1;
}

.dataTables_wrapper * {
    z-index: auto !important;
}

.dt-length label,
.dt-search label {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Rendre les selects normaux dans les filtres DataTables */
thead select {
    height: auto;
    min-height: 40px;        /* ✅ agrandi (était 32px) */
    padding: 8px 10px;       /* ✅ agrandi (était 4px 6px) */
    font-size: 1rem;         /* ✅ agrandi (était 0.9rem) */
    line-height: 1.2;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    box-sizing: border-box;
}

/* Empêche DataTables d’écraser la hauteur */
thead th {
    padding: 6px !important;
    vertical-align: middle;
}

/*Filtres */
.filters form {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.filters-ext {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.filters-left {
    display: flex;
    flex-wrap: wrap;
    gap: 15 px;
}

.filters-left label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 15 px;
}

/* Filtres au-dessus du tableau (pages type presences) */
.page-filters {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.page-filters-left {
    display: flex;
    gap: 15px;
}

.page-filters-left label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.page-filters-right {
    margin-left: auto;
}

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

.ts-wrapper {
    width: 100%;
    margin-bottom: 15px;
}

.ts-wrapper .ts-control {
    min-height: 44px;
    padding: 10px;
    font-size: 1rem;

    border: 1px solid #ccc;
    border-radius: 4px;

    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

.ts-wrapper.focus .ts-control {
    border-color: #d65050;
    box-shadow: 0 0 4px rgba(214,80,80,.4);
}

.ts-wrapper .ts-control input {
    font-size: 1rem;
}

.ts-dropdown {
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ts-dropdown .option {
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.4;
}

.ts-dropdown .active {
    background: #d65050;
    color: white;
}

.ts-dropdown .create {
    padding: 10px 12px;
}

/* ------------------------------ */
/* TomSelect - Pas de retour à la ligne (selects simples) */
/* ------------------------------ */

#membre_individuel + .ts-wrapper .ts-control,
#type_id + .ts-wrapper .ts-control,
#lieu_id + .ts-wrapper .ts-control,
#role + .ts-wrapper .ts-control,
#abs-member + .ts-wrapper .ts-control,
#abs-repetition + .ts-wrapper .ts-control,
#progSelect + .ts-wrapper .ts-control {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    white-space: nowrap;
}

/* ------------------------------ */
/* TomSelect - Entêtes tableaux */
/* ------------------------------ */
thead .ts-wrapper {
    margin-bottom: 0;
}

thead .ts-wrapper .ts-control {

    min-height: 32px;

    padding: 2px 6px;

    font-size: .9rem;
}

/* ------------------------------ */
/* Select2 */
/* ------------------------------ */
/* 1. Forcer le conteneur principal à une hauteur fixe */
.select2-container--default .select2-selection--multiple {
    min-height: 28px !important;
    height: 28px !important; /* Force la hauteur */
    padding: 0 4px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden;
}

/* 2. Supprimer les marges du conteneur de rendu */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
}

/* 3. Réduire drastiquement le badge (le carré gris) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e4e4e4;
    border: 1px solid #aaa;
    border-radius: 3px;
    margin: 0 4px 0 0 !important; /* Supprime la marge haute qui pousse le bord */
    padding: 0 4px !important;
    height: 20px !important;      /* Hauteur du badge */
    line-height: 20px !important;  /* Centre le texte verticalement */
    font-size: 11px;
    display: flex;
    align-items: center;
}

/* 4. Cacher ou réduire le champ de saisie invisible */
/* C'est souvent lui le coupable : il fait 100% de large et a ses propres marges */
.select2-container--default .select2-selection--multiple .select2-search--inline {
    margin: 0 !important;
    height: 100%;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-search__field {
    margin: 0 !important;
    height: 18px !important;
    padding: 0 !important;
}

/* 5. Ajuster la croix de suppression */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 4px !important;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ------------------------------ */
/* Cartes */
/* ------------------------------ */
.map-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.map-modal-content {
    background: white;
    padding: 1rem;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
}

#map {
    width: 100%;
    height: 400px;
    min-height: 300px;
}
@media (max-width: 600px) {
    .map-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #map {
        height: calc(100vh - 60px);
    }
}

/* ------------------------------ */
/* Boxes d'alerte */
/* ------------------------------ */
/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Box */
.modal-box {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 700px;
    max-width: 90%;
    text-align: center;
    animation: pop 0.25s ease-out;
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ------------------------------ */
/* Lignes spéciales */
/* ------------------------------ */
.coordonnees-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coordonnees-row input {
    flex: 1; /* prend tout l’espace disponible */
}

.coordonnees-row button {
    margin-left: auto; /* pousse le bouton complètement à droite */
}

/* ------------------------------ */
/* Points colorés statuts */
/* ------------------------------ */
/* cellule centrée */
.person-cell {
    text-align: center;
    vertical-align: middle;
    height: 38px;
}

/* point rond */
.effectif-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* couleurs */
.effectif-dot.present {
    background-color: #2e7d32;
}

.effectif-dot.excuse {
    background-color: #c62828;
}

.effectif-dot.sans-statut {
    background-color: #f9a825;
}

/* non concerné */
.not-concerned {
    color: #ccc;
}

/* ------------------------------ */
/* Blocs accueil */
/* ------------------------------ */
.home-hero {
    background: linear-gradient(135deg, #D65050, #b44444);
    color: white; /* ← ceci suffit */
    padding: 20px 40px;
    border-radius: 14px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.home-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: white;
}
.home-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}
.home-card {
    background: white;
    padding: 20px 40px;
    border-radius: 14px;
    
    margin: 0 auto 40px auto; /* ← marge en bas */
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    line-height: 1.6;
    color: #333;
}
.home-card-center {
    text-align: center;
}
.separator {
    margin: 30px auto;
    width: 80px;
    height: 2px;
    background: #D65050;
    position: relative;
}
.separator::after {
    content: "🎶";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
}


/* ------------------------------ */
/* Options admin */
/* ------------------------------ */

/* ------------------------------ */
/* Fenêtre options */
/* ------------------------------ */

.options-window {
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 2px 8px rgba(0,0,0,.06),
        0 12px 28px rgba(0,0,0,.08);
    overflow: hidden;
    margin-top: 20px;
}

/* ------------------------------ */
/* Onglets attachés à la fenêtre */
/* ------------------------------ */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #f8f9fb;
    border-bottom: 1px solid #e2e5ea;
    padding: 0 12px;
}

.tab-btn {
    appearance: none;
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 16px 18px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    position: relative;
    transition: color .2s ease, background .2s ease;
    border-radius: 10px 10px 0 0;
    margin-top: 8px;
}

.tab-btn:hover {
    color: #d65050;
    background: rgba(214,80,80,.06);
}

.tab-btn.active {
    color: #d65050;
    background: #fff;
    box-shadow: 0 -1px 0 #fff, 0 1px 0 #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 3px;
    background: #d65050;
    border-radius: 999px;
}

.tab-dot {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: orange;
    margin-left: 6px;
    vertical-align: middle;
}
.tab-btn.has-unsaved .tab-dot {
    display: inline-block;
}


/* ------------------------------ */
/* Contenu des onglets */
/* ------------------------------ */

.tab-content {
    display: none;
    padding: 24px;
    background: #fff;
    overflow-x: auto;
}

.tab-content.active {
    display: block;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions .left,
.table-actions .right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.option-row-modified {
    background: #fff3e0 !important;
}

.option-row-new {
    background: #e8f5e9 !important;
}

.option-row-deleted {
    background: #ffebee !important;
    opacity: .7;
}

.drag-handle {
    cursor: grab;
    text-align: center;
    width: 40px;
    font-size: 18px;
}

.unsaved-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e65100;
    font-weight: 600;
    margin-left: 20px;
}

.unsaved-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff9800;
}

@media (max-width: 768px) {

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions .left,
    .table-actions .right {
        width: 100%;
        justify-content: stretch;
    }

    .table-actions button {
        flex: 1;
    }
}

/* Force "Activation du compte :" sur sa propre ligne, au-dessus des radios */
.form-row:has(.radio-label) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Neutralise le width:100% / padding hérité de la règle input générale */
.radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.radio-label input[type="radio"]:checked {
    border-color: #d65050;
}

.radio-label input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    background: #d65050;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radio-label input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(214, 80, 80, 0.25);
}

.radio-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1rem;
}


/* ------------------------------ */
/*Gestion des partitions */
/* ------------------------------ */
#liensTable thead th.instrument-header {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    vertical-align: bottom;
    padding: 8px 4px;
    height: 120px;
}

.inline-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, max-content));
    gap: 1rem;
    justify-content: start;
}

.rep-card button,
.rep-card.piece-btn {
    width: 100%;
    box-sizing: border-box;
}




