/*
 * MALT - feuille de style unique, pensee mobile d'abord.
 *
 * Les ecrans sont utilises sur le terrain : cibles tactiles larges,
 * contrastes eleves et texte lisible en plein soleil priment sur la densite
 * d'information. Les regles "au-dela de 768px" n'ajoutent que du confort.
 */

:root {
    --bleu: #10559a;
    --bleu-sombre: #0a3d73;
    --bleu-clair: #e8f1fa;
    --ardoise: #1f2933;
    --gris: #62707d;
    --gris-clair: #e4e8ed;
    --fond: #f4f6f8;
    --blanc: #ffffff;

    --danger: #c0392b;
    --danger-clair: #fdecea;
    --attention: #b9770e;
    --attention-clair: #fdf3e2;
    --succes: #1e7e46;
    --succes-clair: #e7f5ec;
    --info: #10559a;
    --info-clair: #e8f1fa;

    --rayon: 10px;
    --ombre: 0 1px 3px rgba(31, 41, 51, .12);
    --ombre-forte: 0 6px 24px rgba(31, 41, 51, .18);

    /* Hauteur minimale d'une cible tactile, gants compris. */
    --cible: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ardoise);
    background: var(--fond);
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }

a { color: var(--bleu); }

/* ---------- Ossature ---------- */

.entete {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .9rem;
    background: var(--bleu);
    color: var(--blanc);
    box-shadow: var(--ombre);
}

.entete a { color: var(--blanc); text-decoration: none; }

.entete .marque {
    font-weight: 700;
    letter-spacing: .06em;
    font-size: 1.05rem;
}

.entete .identite {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.pastille-identite {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-weight: 700;
    font-size: .8rem;
}

.contenu {
    padding: 1rem .9rem 5.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Navigation principale : barre basse au pouce sur mobile. */
.navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    background: var(--blanc);
    border-top: 1px solid var(--gris-clair);
    padding-bottom: env(safe-area-inset-bottom);
}

.navigation a {
    flex: 1;
    min-height: var(--cible);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .4rem .2rem;
    font-size: .7rem;
    text-decoration: none;
    color: var(--gris);
}

.navigation a.actif { color: var(--bleu); font-weight: 600; }
.navigation .icone { font-size: 1.2rem; line-height: 1; }

/* ---------- Blocs ---------- */

.carte {
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    padding: .9rem;
    margin-bottom: .75rem;
    box-shadow: var(--ombre);
}

.carte-titre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .6rem;
}

.section { margin-bottom: 1.5rem; }

.entete-page {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

/* Sortie de secours d'une page de detail : cible tactile pleine hauteur. */
.lien-retour {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: var(--cible);
    margin-bottom: .25rem;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.lien-retour:hover { text-decoration: underline; }

.sous-titre { color: var(--gris); font-size: .85rem; margin: 0; }

/* ---------- Boutons ---------- */

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: var(--cible);
    padding: .55rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--rayon);
    background: var(--bleu);
    color: var(--blanc);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.bouton:hover { background: var(--bleu-sombre); }
/* Un bouton inactif ne doit pas seulement paraitre pale : il sort de la
   palette d'action, sinon il s'appuie quand meme. */
.bouton:disabled,
.bouton:disabled:hover {
    background: var(--gris-clair);
    border-color: var(--gris-clair);
    color: var(--gris);
    cursor: not-allowed;
}

.bouton.secondaire {
    background: var(--blanc);
    color: var(--bleu);
    border-color: var(--gris-clair);
}

.bouton.secondaire:hover { background: var(--bleu-clair); }

.bouton.danger { background: var(--danger); }
.bouton.danger:hover { background: #9c2c20; }

.bouton.compact { min-height: 38px; padding: .3rem .7rem; font-size: .85rem; }
.bouton.pleine-largeur { width: 100%; }

.barre-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

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

.champ { margin-bottom: .9rem; }

.champ label {
    display: block;
    margin-bottom: .3rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gris);
}

input[type="text"], input[type="tel"], input[type="email"],
input[type="date"], input[type="datetime-local"], input[type="number"], input[type="search"],
select, textarea {
    width: 100%;
    min-height: var(--cible);
    padding: .55rem .7rem;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    font-size: 16px; /* en dessous de 16px, iOS zoome au focus */
    font-family: inherit;
    color: var(--ardoise);
    background: var(--blanc);
}

textarea { min-height: 70px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--bleu);
    outline-offset: 1px;
    border-color: var(--bleu);
}

.aide { display: block; margin-top: .25rem; font-size: .75rem; color: var(--gris); }

.erreur-champ { margin-top: .25rem; font-size: .8rem; color: var(--danger); }
.erreur-champ ul { margin: 0; padding-left: 1.1rem; }

/* Cases a cocher et boutons radio : toute la ligne est cliquable. */
.case, .choix label {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: var(--cible);
    padding: .4rem .6rem;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    background: var(--blanc);
    font-size: .9rem;
    font-weight: 500;
    color: var(--ardoise);
    cursor: pointer;
    margin-bottom: .4rem;
}

.case input, .choix input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; }
.case label { margin: 0; font-weight: 500; color: var(--ardoise); font-size: .9rem; }

/* Confirmation acquise : le constat est fait, la case ne se retire plus. */
.case.verrouillee { cursor: default; background: var(--fond); }
.case.verrouillee input { cursor: default; }

.grille-champs { display: grid; gap: .75rem; }

/* ---------- Etiquettes et pastilles ---------- */

.etiquette {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.etiquette.attente { background: var(--gris-clair); color: var(--gris); }
.etiquette.encours { background: var(--info-clair); color: var(--info); }
.etiquette.termine { background: var(--succes-clair); color: var(--succes); }
.etiquette.danger { background: var(--danger-clair); color: var(--danger); }
.etiquette.attention { background: var(--attention-clair); color: var(--attention); }
.etiquette.info { background: var(--info-clair); color: var(--info); }

.jauge {
    height: 8px;
    border-radius: 999px;
    background: var(--gris-clair);
    overflow: hidden;
}

.jauge span {
    display: block;
    height: 100%;
    background: var(--succes);
    border-radius: 999px;
}

/* ---------- Messages ---------- */

.message {
    display: flex;
    gap: .6rem;
    padding: .7rem .9rem;
    border-radius: var(--rayon);
    border-left: 4px solid;
    margin-bottom: .75rem;
    font-size: .9rem;
}

.message.succes { background: var(--succes-clair); border-color: var(--succes); color: #14532d; }
.message.erreur { background: var(--danger-clair); border-color: var(--danger); color: #7f1d1d; }
.message.attention { background: var(--attention-clair); border-color: var(--attention); color: #78350f; }
.message.info { background: var(--info-clair); border-color: var(--info); color: var(--bleu-sombre); }

.vide {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--gris);
    background: var(--blanc);
    border: 1px dashed var(--gris-clair);
    border-radius: var(--rayon);
}

/* ---------- Listes et tableaux ---------- */

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    font-size: .82rem;
    color: var(--gris);
    margin-top: .5rem;
}

.meta strong { color: var(--ardoise); font-weight: 600; }

/*
 * Les tableaux larges defilent dans leur propre conteneur : le corps de page
 * ne doit jamais defiler horizontalement.
 */
.tableau-defilant { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .6rem .5rem; text-align: left; border-bottom: 1px solid var(--gris-clair); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Liste des lignes ---------- */

/*
 * Un seul balisage sert aux deux affichages : cartes en dessous de 1024px
 * (mobile et tablette), vrai tableau au-dela. Ci-dessous la version cartes,
 * la bascule se fait dans la requete media de fin de fichier.
 */
.tableau-lignes, .tableau-lignes tbody { display: block; }
.tableau-lignes thead { display: none; }

.tableau-lignes tr {
    display: block;
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    border-left: 4px solid var(--bleu);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: .9rem;
    margin-bottom: .75rem;
}

.tableau-lignes tr.retard { border-left-color: var(--danger); }
.tableau-lignes tr.termines { border-left-color: var(--succes); }

.tableau-lignes td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    padding: .2rem 0;
    border: none;
    font-size: .88rem;
    text-align: right;
}

.tableau-lignes td::before {
    content: attr(data-libelle);
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gris);
    text-align: left;
}

/* Le nom fait office de titre de carte : ni libelle, ni mise en colonne. */
.tableau-lignes .cellule-nom {
    display: block;
    padding: 0 0 .4rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
}

.tableau-lignes .cellule-nom::before { content: none; }
.tableau-lignes .cellule-nom a { color: var(--ardoise); text-decoration: none; }
.tableau-lignes .cellule-nom .etiquette { margin-left: .35rem; vertical-align: middle; }
.tableau-lignes .cellule-description { color: var(--gris); }

/* En carte, le detail devient une action pleine largeur. */
.tableau-lignes .cellule-action { display: block; padding: .6rem 0 0; }
.tableau-lignes .cellule-action::before { content: none; }
.tableau-lignes .cellule-action .icone-detail { width: 100%; border: 1px solid var(--gris-clair); }

.icone-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: var(--cible);
    min-width: var(--cible);
    border-radius: var(--rayon);
    color: var(--bleu);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
}

.icone-detail:hover { background: var(--bleu-clair); }

/*
 * Le masquage doit l'emporter sur les display: block ci-dessus, sans quoi
 * le filtrage ne cacherait rien.
 */
.tableau-lignes [hidden], .tableau-defilant[hidden] { display: none !important; }

.lecteur-ecran {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Tableau de saisie des pylones ---------- */

.pylones { display: grid; gap: .5rem; }

.pylone {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
    padding: .6rem .7rem;
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    border-left: 4px solid var(--gris-clair);
    border-radius: var(--rayon);
}

.pylone.retard { border-left-color: var(--danger); background: #fffafa; }
.pylone.termine { border-left-color: var(--succes); }
.pylone.encours { border-left-color: var(--bleu); }
.pylone.hors-nip { border-left-color: var(--attention); }

.pylone-numero {
    font-weight: 700;
    font-size: .95rem;
    min-width: 3.2rem;
    flex-shrink: 0;
}

.pylone-dates { flex: 1; min-width: 0; font-size: .8rem; color: var(--gris); }
.pylone-dates strong { color: var(--ardoise); font-weight: 600; }
/*
 * Sur mobile, les boutons passent sous les dates : les comprimer sur la meme
 * ligne hacherait l'echeance en une colonne de mots.
 */
.pylone-actions {
    display: flex;
    gap: .35rem;
    flex-shrink: 0;
    width: 100%;
    justify-content: flex-end;
}

/* Ce qui a ete constate sur le terrain, sous le previsionnel. */
.intitule-date {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gris);
    font-weight: 600;
}

.dates-reelles {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem .8rem;
    margin-top: .15rem;
    color: var(--succes);
    font-weight: 600;
}

.dates-reelles .intitule-date { color: var(--succes); }

.herite { font-style: italic; }

/* Panneau d'edition : plein ecran sur mobile, encadre au-dela. */
.panneau-fond {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(31, 41, 51, .55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.panneau {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--blanc);
    border-radius: var(--rayon) var(--rayon) 0 0;
    padding: 1rem .9rem calc(1rem + env(safe-area-inset-bottom));
}

.panneau-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--gris-clair);
}

.fermer {
    border: none;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--gris);
    cursor: pointer;
    min-height: var(--cible);
    min-width: var(--cible);
}

/* ---------- Filtres ---------- */

.filtres {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .4rem;
    margin-bottom: .75rem;
}

.filtres a, .filtres button {
    flex-shrink: 0;
    padding: .45rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--gris-clair);
    background: var(--blanc);
    color: var(--gris);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.filtres a.actif, .filtres button.actif { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }

.recherche { display: flex; gap: .5rem; margin-bottom: .75rem; }

/* ---------- Compteurs ---------- */

.compteurs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    margin-bottom: 1rem;
}

.compteur {
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    padding: .7rem;
    text-align: center;
}

.compteur .valeur { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.compteur .libelle { font-size: .72rem; color: var(--gris); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Connexion ---------- */

.page-connexion {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1rem;
    max-width: 460px;
    margin: 0 auto;
}

.logo-connexion { text-align: center; margin-bottom: 1.5rem; }
.logo-connexion .marque { font-size: 2rem; font-weight: 800; letter-spacing: .1em; color: var(--bleu); }
.logo-connexion p { color: var(--gris); font-size: .9rem; margin: .25rem 0 0; }

/* Saisie du code : chiffres espaces et clavier numerique. */
.saisie-code {
    width: 100%;
    text-align: center;
    font-size: 2rem !important;
    font-weight: 700;
    letter-spacing: .5rem;
    padding: .7rem;
    font-variant-numeric: tabular-nums;
}

/* ---------- Ternes ---------- */

.terne-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .8rem;
    background: var(--bleu-clair);
    border-radius: var(--rayon) var(--rayon) 0 0;
    border: 1px solid var(--gris-clair);
    border-bottom: none;
    font-weight: 700;
    color: var(--bleu-sombre);
}

.terne-corps {
    border: 1px solid var(--gris-clair);
    border-radius: 0 0 var(--rayon) var(--rayon);
    padding: .9rem;
    background: var(--blanc);
    margin-bottom: 1rem;
}

.fiche { display: grid; gap: .5rem; margin-bottom: .9rem; }

.fiche-ligne {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .87rem;
    padding-bottom: .4rem;
    border-bottom: 1px dashed var(--gris-clair);
}

.fiche-ligne:last-child { border-bottom: none; }
.fiche-ligne dt { color: var(--gris); margin: 0; }
.fiche-ligne dd { margin: 0; font-weight: 600; text-align: right; }

.coche { color: var(--succes); font-weight: 700; }
.decoche { color: var(--gris); }

/* ---------- Alertes ---------- */

.alerte-ligne {
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    border-left: 4px solid var(--gris-clair);
    border-radius: var(--rayon);
    padding: .8rem;
    margin-bottom: .6rem;
}

.alerte-ligne.danger { border-left-color: var(--danger); }
.alerte-ligne.attention { border-left-color: var(--attention); }
.alerte-ligne.info { border-left-color: var(--info); }

.alerte-entete {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}

.alerte-message { font-size: .88rem; margin: 0 0 .4rem; }
.alerte-pied { font-size: .75rem; color: var(--gris); display: flex; flex-wrap: wrap; gap: .3rem 1rem; }

.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; align-items: center; }

/* ---------- Bloc pylone dans le formulaire de creation ---------- */

.pylone-saisie {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: .7rem;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    background: var(--fond);
    margin-bottom: .5rem;
}

.pylone-saisie .champ { margin-bottom: 0; }

.pylone-saisie-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: .85rem;
    color: var(--gris);
}

/* Masque le modele de ligne utilise pour l'ajout dynamique. */
.gabarit { display: none !important; }

/* ---------- Confort au-dela du mobile ---------- */

@media (min-width: 768px) {
    body { font-size: 16px; }
    h1 { font-size: 1.6rem; }

    .contenu { padding: 1.5rem 1.5rem 2rem; }

    /* La navigation repasse en haut : plus de barre de pouce. */
    .navigation {
        position: static;
        border-top: none;
        border-bottom: 1px solid var(--gris-clair);
        padding: 0 1rem;
        max-width: 1100px;
        margin: 0 auto;
        background: transparent;
    }

    .navigation a {
        flex: 0 0 auto;
        flex-direction: row;
        gap: .4rem;
        padding: .8rem 1rem;
        font-size: .9rem;
        border-bottom: 3px solid transparent;
    }

    .navigation a.actif { border-bottom-color: var(--bleu); }
    .navigation .icone { font-size: 1rem; }

    .grille-champs { grid-template-columns: repeat(2, 1fr); }
    .grille-champs .pleine { grid-column: 1 / -1; }

    .compteurs { grid-template-columns: repeat(4, 1fr); }

    .panneau-fond { align-items: center; padding: 1rem; }
    .panneau { max-width: 560px; border-radius: var(--rayon); }

    /* La place revenue, les boutons regagnent la ligne des dates. */
    .pylone-actions { width: auto; }

    .pylone-saisie { grid-template-columns: 110px repeat(2, 1fr) 150px 90px; align-items: end; }
    .pylone-saisie-entete { grid-column: 1 / -1; }
    .pylone-saisie .commentaire { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
    .fiche { grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; }

    /* Au-dela de la tablette, les cartes redeviennent un vrai tableau. */
    .tableau-defilant {
        background: var(--blanc);
        border: 1px solid var(--gris-clair);
        border-radius: var(--rayon);
        box-shadow: var(--ombre);
    }

    .tableau-lignes { display: table; }
    .tableau-lignes thead { display: table-header-group; }
    .tableau-lignes tbody { display: table-row-group; }

    .tableau-lignes tr {
        display: table-row;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .tableau-lignes tbody tr:hover { background: var(--bleu-clair); }
    .tableau-lignes th { padding: .7rem .75rem; white-space: nowrap; }

    .tableau-lignes td {
        display: table-cell;
        vertical-align: middle;
        padding: .7rem .75rem;
        border-bottom: 1px solid var(--gris-clair);
        text-align: left;
    }

    /* Les deux cellules mises en forme de titre et d'action redeviennent des colonnes. */
    .tableau-lignes .cellule-nom,
    .tableau-lignes .cellule-action {
        display: table-cell;
        vertical-align: middle;
        padding: .7rem .75rem;
    }

    .tableau-lignes tbody tr:last-child td { border-bottom: none; }
    .tableau-lignes td::before { content: none; }

    /* L'etat se lit sur le liseré de la premiere colonne. */
    .tableau-lignes td:first-child { border-left: 3px solid transparent; }
    .tableau-lignes tr.retard td:first-child { border-left-color: var(--danger); }
    .tableau-lignes tr.termines td:first-child { border-left-color: var(--succes); }

    /* Assez large pour qu'un nom de ligne ne se brise pas a chaque mot. */
    .tableau-lignes .cellule-nom { min-width: 12rem; font-size: .9rem; font-weight: 600; }
    .tableau-lignes .cellule-nom a { color: var(--bleu); }
    .tableau-lignes .cellule-nom a:hover { text-decoration: underline; }

    /* CDT, GMR et dates tiennent sur une ligne : la description absorbe le reste. */
    .tableau-lignes td:nth-child(n+3):nth-child(-n+6) { white-space: nowrap; }

    /* La description est la seule colonne elastique : on la borne. */
    .tableau-lignes .cellule-description {
        max-width: 14rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tableau-lignes .cellule-action { width: 1%; text-align: center; }
    .tableau-lignes .cellule-action .icone-detail { width: auto; border: none; }
    .libelle-detail { display: none; }
}

/* ---------- Impression ---------- */

@media print {
    .entete, .navigation, .barre-actions, .filtres, .recherche { display: none; }
    .contenu { padding: 0; }
    .carte, .terne-corps { box-shadow: none; border-color: #999; }
}
