/* Planning2SP — styles complémentaires à Tailwind */

#sidebar {
    transition: transform 0.2s ease-in-out;
}

/* --------------------------------------------------------------------- */
/* Grille de planning                                                     */
/* --------------------------------------------------------------------- */

/* La colonne d'un jour est un contexte de positionnement : les blocs de
   shift sont placés en absolu, en pourcentage de l'amplitude du jour. */
.day-column {
    position: relative;
}

.shift-block {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 6px;
    padding: 4px 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.15s, transform 0.1s;
}

.shift-block:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    z-index: 5;
}

/* Cible de dépôt survolée pendant un glisser : même signal visuel que
   CleanCheck (bordure et fond primary). */
.drop-target {
    outline: 2px dashed #2dd4bf;
    outline-offset: -2px;
    background-color: #f0fdfa !important;
}

.gap-block {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 6px;
    padding: 4px 6px;
    background: repeating-linear-gradient(
        45deg,
        #fee2e2,
        #fee2e2 6px,
        #fecaca 6px,
        #fecaca 12px
    );
    border: 1px solid #fca5a5;
    color: #991b1b;
    cursor: pointer;
    overflow: hidden;
}

.hour-line {
    border-top: 1px solid #f3f4f6;
}

.hour-line.hour-major {
    border-top-color: #e5e7eb;
}

/* Zone hors ouverture : hachures discrètes pour la distinguer sans la
   rendre bruyante. */
.closed-area {
    background: repeating-linear-gradient(
        45deg,
        #f9fafb,
        #f9fafb 8px,
        #f3f4f6 8px,
        #f3f4f6 16px
    );
}

/* Carte étudiant sélectionnée en mode tap-tap (tactile). */
.student-card.selected {
    outline: 2px solid #0d9488;
    outline-offset: 1px;
}

.student-card[draggable="true"] {
    cursor: grab;
}

.student-card[draggable="true"]:active {
    cursor: grabbing;
}

/* --------------------------------------------------------------------- */
/* Grille d'indisponibilités                                              */
/* --------------------------------------------------------------------- */

.avail-cell {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.avail-cell.selecting {
    background-color: #bae6fd !important;
}

/* --------------------------------------------------------------------- */
/* Mobile                                                                 */
/* --------------------------------------------------------------------- */

@media (max-width: 640px) {
    input, select, textarea, button {
        font-size: 16px !important; /* évite le zoom automatique iOS */
    }
}

@media print {
    #sidebar, .no-print { display: none !important; }
    main { margin-left: 0 !important; }
}
