﻿.student-layout-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.student-left-column {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.student-table-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 1rem;
    padding: 0px 0.5rem; /* pour ne pas cacher le scroll */
}

    /* Optionnel : fixe les en-têtes de colonne */
    .student-table-wrapper thead th {
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 1;
        text-align: center;
    }

.student-right-column {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2rem;
}

.toggle-groups-btn {
    color: white;
    border: 0;
    background-color: var(--secondary-color);
}

    .toggle-groups-btn:hover, .toggle-groups-btn:active, .toggle-groups-btn:focus {
        border: 2px solid var(--secondary-color);
        background-color: white;
        color: var(--secondary-color);
    }

.student-checkbox-column {
    min-width: 60px !important;
    width: 60px !important;
    text-align: center !important;
}


.student-clickable-column {
    cursor: pointer;
    text-align: center;
    min-width: 60px;
}


.module-student {
    border: 1px solid white;
    border-radius: 10px;
}

.student-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    background-color: white;
    margin: 0;
}

.student-header {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 10px 10px 0px 0px;
}

    .student-header .header-details {
        border: none;
        border-radius: 10px 10px 0 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--primary-color);
        padding: 0px;
        color: white;
        overflow: hidden;
    }

.student-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 200px; /* Permet au scroll de fonctionner */
}

.student-row:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.2);
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

.student-row.selected td {
    box-shadow: inset 0 3px 0 0 var(--important-color), inset 0 -3px 0 0 var(--important-color);
}

.student-row.selected td:first-child {
    box-shadow: inset 0 3px 0 0 var(--important-color), inset 0 -3px 0 0 var(--important-color), inset 3px 0 0 0 var(--important-color);
    border-radius: 5px 0 0 5px;
}

.student-row.selected td:last-child {
    box-shadow: inset 0 3px 0 0 var(--important-color), inset 0 -3px 0 0 var(--important-color), inset -3px 0 0 0 var(--important-color);
    border-radius: 0 5px 5px 0;
}

/* Section contenant le titre + la liste */
.selected-students-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 175px;
    overflow-y: auto;
}

/* Titre */
.section-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

/* Liste sans bordure */
.student-ul.no-border {
    list-style: none;
    padding-left: 0.5rem;
    margin: 0;
    font-size: 0.85rem;
    color: #333;
}

/* Élément individuel avec accent gauche */
.student-li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

/* Bordure gauche légère */
.accent-border-start {
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5rem;
    margin-left: 0.25rem;
}

/* Label classe */
.classroom-label {
    font-style: italic;
    color: #888;
    font-size: 0.8rem;
}

.classroom-dropdown-inline {
    width: auto;
    min-width: 180px;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

.separator-or {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    font-weight: bold;
    color: #888;
    width: 100%;
}

    .separator-or::before,
    .separator-or::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #ccc;
        margin: 0 1rem;
    }


/* 
    Formulaire 
*/
/* Espacement global réduit */
.student-details-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem;
}

/* Form group plus compact */
.student-form-group {
    display: flex;
    flex-direction: column;
}

    .student-form-group label {
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

/* Form rows + colonnes */
.student-form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.student-form-column {
    flex: 1;
    min-width: 150px;
}


.student-radio-pill-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.student-radio-pill-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.student-radio-pill {
    display: none;
}

    .student-radio-pill + .student-radio-pill-label,
    .student-radio-pill-label {
        cursor: pointer;
        padding: 0.4rem 1rem;
        border-radius: 20px;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        background-color: white;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.2s ease-in-out;
        user-select: none;
    }

input[type="radio"]:checked + .student-radio-pill-label {
    background-color: var(--primary-color);
    color: white;
}

input[type="radio"]:disabled + .student-radio-pill-label {
    opacity: 0.5;
    cursor: not-allowed;
}





.student-radio-group-horizontal .form-check {
    display: flex;
    align-items: center; /* ✅ Aligne les radios et le texte verticalement */
    gap: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.student-radio-group-horizontal .form-check-input {
    margin: 0; /* Supprime les marges verticales par défaut */
    transform: translateY(1px); /* Petit ajustement visuel si besoin */
}

.student-radio-group-horizontal .form-check-label {
    margin: 0;
    padding: 0;
}


/* Liste des contacts + fratrie */
.student-contact-list,
.student-sibling-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-left: 0.25rem;
}

.student-contact-item,
.student-sibling-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    font-size: 0.9rem;
}

    .student-contact-item span:first-child,
    .student-sibling-item span:first-child {
        color: #333;
    }

    /* Bouton de suppression (x) */
    .student-contact-item button,
    .student-sibling-item button {
        background: none;
        border: none;
        color: var(--important-color);
        font-size: 1rem;
        cursor: pointer;
    }

/* Container pour ajout */
.student-add-contact-container,
.student-add-sibling-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.5rem;
    margin-left: 1rem; /* Décalage à gauche */
}



/* Bouton + bien centré */
.student-add-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    padding: 0;
}

    .student-add-btn:hover {
        background-color: var(--secondary-color);
    }

/* Barre de boutons */
.student-button-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.student-action-btn {
    font-size: 1.2rem;
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .student-action-btn.primary {
        background-color: var(--primary-color);
        color: white;
        border: none;
    }

    .student-action-btn.danger {
        background-color: var(--important-color);
        color: white;
        border: none;
    }

    .student-action-btn:hover {
        opacity: 0.9;
    }

/* Responsive mobile */
@media (max-width: 768px) {
    .student-form-row {
        flex-direction: column;
    }

    .student-form-column {
        width: 100%;
    }

    .student-add-contact-container,
    .student-add-sibling-container {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .student-button-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

.student-group-row {
    background-color: rgba(var(--primary-color-rgb), 0.4);
    font-weight: bold;
    font-size: 1rem; /* augmente ou diminue la taille */
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
}

    .student-group-row td {
        padding: 0.75rem 1rem;
    }


.student-careplan-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 0.25rem;
}

.student-careplan-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.student-careplan-textarea {
    margin-left: 2rem;
}

    .student-careplan-textarea textarea {
        font-size: 0.85rem;
        resize: vertical;
        min-height: 80px;
    }

/* Icônes stylisées */
.student-careplan-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}


/* ------------------------------- */
/* Shimmer unique qui imite un champ input */
.student-skeleton-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient( 90deg, color-mix(in oklab, CanvasText, transparent 92%) 0%, color-mix(in oklab, CanvasText, transparent 85%) 50%, color-mix(in oklab, CanvasText, transparent 92%) 100% );
    background-size: 200% 100%;
    animation: student-shimmer 1.1s linear infinite;
    box-shadow: inset 0 0 0 1px color-mix(in oklab, CanvasText, transparent 90%), 0 2px 10px color-mix(in oklab, CanvasText, transparent 95%);
    padding: 0 1rem;
    overflow: hidden;
}

/* Texte intégré */
.student-skeleton-label {
    font-size: 0.9rem;
    font-style: italic;
    color: color-mix(in oklab, CanvasText, transparent 40%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sibling-separator {
    border-top: 1px solid #ddd;
    margin: 4px 0 2px 0;
    padding-top: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
}

.sibling-item-line {
    padding: 2px 0;
}

/* Animation shimmer */
@keyframes student-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: 0 0;
    }
}
