.planning {
    margin: 20px;
    font-family: Arial, sans-serif;
}

h1 {
    margin-bottom: 10px;
    text-align: center;
}

.centre {
    text-align: center;
}

.titre-semaine {
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin-top: 30px;
}

.titre-semaine.semaine-a {
    background-color: #c0da39;
}

.titre-semaine.semaine-b {
    background-color: #aaaad5;
}

.titre-semaine.semaine-c {
    background-color: #55bbbb;
}

.titre-semaine.semaine-d {
    background-color: #ff71aa;
}

/* Grille */

.grille-creneaux {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    margin: 16px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Sur desktop, passer en grille */
@media (min-width: 901px) {
    .grille-creneaux {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        justify-content: center;
    }

    .grille-inscriptions {
        grid-template-columns: repeat(auto-fit, minmax(340px, 500px));
        justify-content: center;
    }
}

.grille-creneaux.semaine-a {
    background-color: #d2e471;
}
.grille-creneaux.semaine-b {
    background-color: #c6c6e3;
}
.grille-creneaux.semaine-c {
    background-color: #8ed2d2;
}
.grille-creneaux.semaine-d {
    background-color: #ffaacc;
}

/* Carte */

.carte-creneau {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 14px 16px;
    box-sizing: border-box;
    width: 100%;
}

/* Desktop - limiter la largeur des cartes */
@media (min-width: 901px) {
    .carte-creneau {
        max-width: 500px;
    }
}

.carte-annulee {
    opacity: 0.8;
}

/* Entête */

.carte-entete {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.carte-entete > div {
    text-align: left;
}

.carte-entete > div:nth-child(2) {
    text-align: right;
}

/* Pour les créneaux du planning (avec span horaire direct) */
.carte-entete > .carte-horaire {
    flex-shrink: 0;
    text-align: right;
}

.carte-code {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.carte-type {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 2px;
}

.carte-semaine {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 999px;
    text-align: center;
}

.carte-horaire {
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .carte-horaire {
        white-space: normal;
        word-break: break-word;
    }
}

/* Places */

.carte-places {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ligne-place {
    margin: 0;
}

.ligne-fixe,
.ligne-volant{
    color: #666;
    margin-bottom: 4px;
}
.ligne-fixe .place-inscription svg,
.ligne-volant .place-inscription svg{
    fill:#666;
}

/* Place nécessaire */

.ligne-necessaire,
.ligne-possible,
.ligne-annulation {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width:100%;
}

.place-libelle {
}

.place-formation {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #777;
}

.place-annulee {
    text-decoration: line-through;
    color: #666;
}

.ligne-necessaire a,
.ligne-possible a {
    flex-shrink: 0;
    font-size: 0.95rem;
    text-decoration: none;
    color: #0047ff;
}

.ligne-necessaire a:hover,
.ligne-possible a:hover {
    text-decoration: underline;
}

/* Annulation */

.carte-annule-texte {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* Mobile et tablettes */

@media (max-width: 900px) {
    .grille-creneaux {
        padding: 8px;
        margin: 8px;
        gap: 12px;
    }

    .carte-creneau {
        width: 100% !important;
        padding: 12px 14px;
    }

    .carte-entete {
        gap: 8px;
        align-items: flex-start;
    }

    .carte-horaire {
        white-space: normal;
    }

    .ligne-necessaire, .ligne-possible {
        gap: 10px;
        align-items: center;
    }

    .place-libelle {
        flex: 1;
        min-width: 0;
    }

    .place-inscription {
        flex-shrink: 0;
    }
}

.semaine-creneaux {
    background: #f3f1ec;
    padding: 16px;
    border-radius: 8px;
}