/* ══════════════════════════════════════════════════════════════════
   RÉGLAGES RAPIDES — identiques à ceux des fiches de semaine
   ══════════════════════════════════════════════════════════════════ */
:root {
    --encre: #171C22;
    --encre-douce: #59636E;
    --vert: #1F4D3D;
    --vert-clair: #EDF2EF;
    --filet: #E2E6E4;
    --papier: #FFFFFF;

    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 22mm 14mm 30mm;
    background: var(--papier);
    color: var(--encre);
    font-family: var(--serif);
    font-size: 11.5pt;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}

.fiche {
    max-width: 190mm;
    margin: 0 auto;
}

/* ─── En-tête, repris à l'identique des fiches ──────────────────── */
.chapeau {
    display: flex;
    justify-content: space-between;
    gap: 8mm;
    font-family: var(--sans);
    font-size: 8.5pt;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--vert);
    margin-bottom: 13mm;
}

.chapeau .num {
    color: var(--encre-douce);
    letter-spacing: .1em;
}

h1 {
    font-size: 27pt;
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -.015em;
    margin: 0 0 5mm;
    max-width: 28ch;
}

.sous-titre {
    font-size: 12.5pt;
    font-style: italic;
    font-weight: 300;
    color: var(--encre-douce);
    line-height: 1.5;
    max-width: 62ch;
    margin: 0 0 14mm;
}

.entete-rule {
    border: none;
    border-top: 1.5px solid var(--vert);
    margin: 0 0 6mm;
}

/* ─── Le sommaire ────────────────────────────────────────────────── */
table.sommaire {
    width: 100%;
    border-collapse: collapse;
}

table.sommaire tr {
    border-bottom: 1px solid var(--filet);
}

table.sommaire tr:first-child {
    border-top: 1px solid var(--filet);
}

table.sommaire td {
    padding: 6mm 0;
    vertical-align: middle;
}

/* Colonne 1 : le téléchargement */
td.col-dl {
    width: 14mm;
    padding-right: 4mm;
}

.dl-lien {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10mm;
    height: 10mm;
    border-radius: 50%;
    border: 1px solid var(--filet);
    color: var(--vert);
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.dl-lien svg {
    width: 4.6mm;
    height: 4.6mm;
    display: block;
}

tr:hover .dl-lien {
    background: var(--vert);
    border-color: var(--vert);
    color: #fff;
}

/* Colonne 2 : le nom du cours */
td.col-titre {
    padding-left: 2mm;
}

.col-titre a {
    color: var(--encre);
    text-decoration: none;
}

.col-titre a:hover .titre-cours {
    color: var(--vert);
}

.rang {
    display: block;
    font-family: var(--sans);
    font-size: 8pt;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--encre-douce);
    margin-bottom: 1.5mm;
}

.titre-cours {
    display: block;
    font-size: 14pt;
    font-weight: 500;
    letter-spacing: -.005em;
    transition: color .15s ease;
}

.sous-ligne {
    display: block;
    font-family: var(--sans);
    font-size: 9.3pt;
    font-weight: 400;
    color: var(--encre-douce);
    margin-top: 1.5mm;
    line-height: 1.5;
}

/* ─── Navigation retour ──────────────────────────────────────────── */
.nav-retour {
    font-family: var(--sans);
    font-size: 9pt;
    margin: 0 0 9mm;
}

/* ─── Lien simple (retour accueil, etc.) ────────────────────────── */
.lien {
    color: var(--vert);
    text-decoration: none;
    border-bottom: 1px solid var(--filet);
    padding-bottom: 1px;
    transition: border-color .15s ease;
}

.lien:hover {
    border-color: var(--vert);
}

/* ─── Administration ─────────────────────────────────────────────── */
.admin-bloc {
    margin-bottom: 16mm;
    padding-bottom: 10mm;
    border-bottom: 1px solid var(--filet);
}

.admin-bloc h2 {
    font-family: var(--sans);
    font-size: 10pt;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vert);
    margin: 0 0 5mm;
}

.admin-flash {
    font-family: var(--sans);
    font-size: 10pt;
    background: var(--vert-clair);
    color: var(--vert);
    border: 1px solid var(--filet);
    border-radius: 4px;
    padding: 3mm 4mm;
    margin: 0 0 8mm;
}

.admin-flash.erreur {
    background: #FBEDEC;
    color: #8A2E22;
}

.admin-ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3mm;
    border-bottom: 1px solid var(--filet);
}

.admin-ligne:first-child {
    border-top: 1px solid var(--filet);
}

.admin-cours {
    display: flex;
    align-items: center;
    gap: 3mm;
    padding: 2.5mm 0;
    font-family: var(--sans);
    font-size: 10pt;
    cursor: pointer;
}

.admin-cours input[type="checkbox"] {
    flex-shrink: 0;
}

.admin-cours .fichier {
    color: var(--encre-douce);
    font-size: 8.5pt;
}

.admin-cours .fichier-dl {
    display: inline-block;
    margin-left: 2mm;
    padding: 0.3mm 2mm;
    font-size: 8pt;
    color: var(--vert);
    background: var(--vert-clair);
    border-radius: 3px;
}

.admin-ordre {
    width: 12mm;
    flex-shrink: 0;
    font-family: var(--sans);
    font-size: 9.5pt;
    padding: 1mm 1.5mm;
    border: 1px solid var(--filet);
    border-radius: 3px;
    color: var(--encre);
    background: var(--papier);
    text-align: center;
}

.bouton-suppr {
    flex-shrink: 0;
    font-family: var(--sans);
    font-size: 8.5pt;
    color: #8A2E22;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1mm 2mm;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color .15s ease;
}

.bouton-suppr:hover {
    text-decoration-color: #8A2E22;
}

.bouton-download {
    flex-shrink: 0;
    font-family: var(--sans);
    font-size: 8.5pt;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1mm 2mm;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color .15s ease;
}

.admin-form {
    display: grid;
    gap: 3mm;
    max-width: 100mm;
    margin-top: 5mm;
}

.admin-form label {
    font-family: var(--sans);
    font-size: 9pt;
    font-weight: 500;
    color: var(--encre-douce);
    display: block;
    margin-bottom: 1mm;
}

.admin-form label span.required {
    color: red;
}

.admin-form input[type="text"],
.admin-form textarea,
.admin-form input[type="file"] {
    width: 100%;
    font-family: var(--sans);
    font-size: 10pt;
    padding: 2.5mm 3mm;
    border: 1px solid var(--filet);
    border-radius: 4px;
    color: var(--encre);
    background: var(--papier);
}

.admin-form textarea {
    resize: vertical;
    min-height: 16mm;
}

.admin-form .case {
    display: flex;
    align-items: center;
    gap: 2mm;
    font-family: var(--sans);
    font-size: 9.5pt;
    color: var(--encre);
    width: fit-content;
    cursor: pointer;
}

.bouton {
    font-family: var(--sans);
    font-size: 9.5pt;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
    background: var(--vert);
    border: none;
    border-radius: 4px;
    padding: 2.8mm 6mm;
    cursor: pointer;
    width: fit-content;
    margin-top: 20px;
}

.bouton:hover {
    opacity: .9;
}

/* ─── Pied de page ──────────────────────────────────────────────── */
.pied {
    margin-top: 14mm;
    padding-top: 5mm;
    border-top: 1px solid var(--filet);
    font-family: var(--sans);
    font-size: 8.5pt;
    color: var(--encre-douce);
}

/* ─── Téléphone ─────────────────────────────────────────────────── */
@media screen and (max-width: 620px) {
    body {
        padding: 12mm 6mm 20mm;
        font-size: 12pt;
    }

    h1 {
        font-size: 21pt;
    }

    .chapeau {
        flex-direction: column;
        gap: 1mm;
        margin-bottom: 8mm;
    }

    td.col-dl {
        width: 11mm;
    }

    .titre-cours {
        font-size: 12.5pt;
    }
}