/* =====================================================================
   miguelmorin.ca — feuille de style principale
   ---------------------------------------------------------------------
   Papier, encre, crayon rouge : l'allure d'un plan d'atelier bien tenu.
   Deux polices auto-hébergées (Lora pour les titres, Source Sans pour le
   texte). Pas de dégradé, pas d'ombre portée, pas d'animation au
   défilement : la typographie et les filets font le travail.

   Couleurs qui ont un sens :
     rouge = ce qui se perd (retailles, kilomètres de trop, irritants)
     vert  = ce qui se gagne
   ===================================================================== */

@font-face {
    font-family: "Lora";
    src: url("../fonts/lora-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("../fonts/lora-400-italique.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("../fonts/lora-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Source Sans";
    src: url("../fonts/source-sans-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Source Sans";
    src: url("../fonts/source-sans-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --papier: #f4f1ea;
    --papier-clair: #faf8f3;
    --papier-fonce: #ebe6da;
    --encre: #1c1a17;
    --encre-2: #4a453d;     /* texte secondaire, contraste 8,6:1 */
    --encre-3: #696254;     /* légendes, contraste 5,3:1 (4,8:1 sur papier foncé) */
    --filet: #d9d2c3;
    --filet-fort: #b8ae99;
    --rouge: #b3361e;       /* crayon rouge : les pertes, l'action */
    --vert: #2c6a4c;        /* les gains */

    /* Huit teintes pour distinguer des employés ou des longueurs de pièces. */
    --t0: #2f5d8a;
    --t1: #a35d1c;
    --t2: #4f7a3a;
    --t3: #6b4a85;
    --t4: #1f7178;
    --t5: #8a6d1b;
    --t6: #7a3f4e;
    --t7: #4b5563;

    --serif: "Lora", Georgia, "Times New Roman", serif;
    --sans: "Source Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

    --largeur: 74rem;
    --mesure: 40rem;
    --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--papier);
    color: var(--encre);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.012em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 1.45rem + 2.9vw, 3.6rem);
    line-height: 1.06;
}

h2 {
    font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.35rem);
}

h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.3;
    margin: 0 0 0.4em;
}

p {
    margin: 0 0 1em;
    max-width: var(--mesure);
    text-wrap: pretty;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: var(--filet-fort);
}

a:hover {
    color: var(--rouge);
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 3px solid var(--rouge);
    outline-offset: 2px;
}

::selection {
    background: #f1d3c8;
    color: var(--encre);
}

abbr[title] {
    text-decoration: none;
}

.num {
    font-variant-numeric: tabular-nums lining-nums;
}

.visuellement-cache {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.evitement {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    background: var(--encre);
    color: var(--papier);
    padding: 0.6rem 1rem;
    font-weight: 600;
    text-decoration: none;
}

.evitement:focus {
    top: 1rem;
    color: var(--papier);
}

main {
    flex: 1 0 auto;
}

main:focus {
    outline: none;
}

/* ---------------------------------------------------------------------
   Mise en page
   --------------------------------------------------------------------- */

.cadre {
    max-width: var(--largeur);
    margin-inline: auto;
    padding-inline: var(--gouttiere);
}

.deux-colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 2rem clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section + .section {
    border-top: 1px solid var(--filet);
}

.section-collee {
    padding-top: 0.5rem;
}

.section + .section-collee,
.une + .section-collee {
    border-top: 0;
}

.section-parcours {
    background: var(--papier-fonce);
}

.section-tete {
    margin-bottom: 2.25rem;
    max-width: 46rem;
}

.deux-colonnes > .section-tete {
    margin-bottom: 0;
}

.chapeau {
    font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);
    line-height: 1.55;
    color: var(--encre-2);
}

.precision {
    font-size: 0.95rem;
    color: var(--encre-3);
}

.note {
    font-size: 0.95rem;
    color: var(--encre-3);
    margin-top: 1.75rem;
}

.titre-petit {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

/* ---------------------------------------------------------------------
   Boutons et liens forts
   --------------------------------------------------------------------- */

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: 600 1.02rem/1.2 var(--sans);
    padding: 0.85rem 1.35rem;
    background: var(--encre);
    color: var(--papier);
    border: 1.5px solid var(--encre);
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
}

.bouton:hover {
    background: var(--rouge);
    border-color: var(--rouge);
    color: #fff;
}

.bouton:disabled {
    opacity: 0.55;
    cursor: progress;
}

.lien-fort {
    font-weight: 600;
    color: var(--encre);
    text-decoration: underline;
    text-decoration-color: var(--rouge);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
}

.lien-fort:hover {
    color: var(--rouge);
}

/* ---------------------------------------------------------------------
   En-tête
   --------------------------------------------------------------------- */

.entete {
    border-bottom: 1px solid var(--filet);
}

.entete .cadre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding-block: 0.85rem;
}

.marque {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--encre);
    text-decoration: none;
}

.marque:hover {
    color: var(--encre);
}

.marque img {
    width: 2.9rem;
}

.marque-nom {
    font: 700 1.2rem/1 var(--serif);
    white-space: nowrap;
}

.marque-role {
    font-size: 0.92rem;
    color: var(--encre-3);
    padding-left: 0.75rem;
    border-left: 1px solid var(--filet-fort);
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    font-weight: 600;
    text-decoration: none;
    padding-block: 0.3rem;
}

.nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--rouge);
}

.nav .nav-contact {
    border: 1.5px solid var(--encre);
    border-radius: 2px;
    padding: 0.4rem 0.9rem;
}

.nav .nav-contact:hover,
.nav .nav-contact[aria-current="page"] {
    background: var(--encre);
    color: var(--papier);
    box-shadow: none;
}

/* ---------------------------------------------------------------------
   Une (haut de page)
   --------------------------------------------------------------------- */

.une {
    padding-top: clamp(2rem, 6vw, 4.5rem);
}

.une-cadre {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 2rem clamp(2rem, 6vw, 6rem);
    align-items: end;
}

.une h1 {
    max-width: 16ch;
}

.une-texte .chapeau {
    max-width: 34rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.6rem;
    margin: 1.9rem 0 0.9rem;
}

.une-portrait {
    margin: 0;
    max-width: 22rem;
    justify-self: end;
    width: 100%;
}

.une-portrait img,
.contact-portrait img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--papier-clair);
    border: 1px solid var(--filet-fort);
    padding: 0.4rem;
}

.une-portrait figcaption {
    margin-top: 0.6rem;
    font-size: 0.92rem;
    color: var(--encre-3);
}

/* La règle graduée sous le haut de page : « sur mesure », littéralement. */
.regle {
    height: 1.25rem;
    border: 0;
    margin: clamp(2.25rem, 5vw, 3.5rem) 0 0;
    background:
        linear-gradient(var(--encre), var(--encre)) bottom / 100% 1.5px no-repeat,
        repeating-linear-gradient(90deg, var(--encre) 0 1px, transparent 1px 10px) bottom / 100% 5px no-repeat,
        repeating-linear-gradient(90deg, var(--encre) 0 1px, transparent 1px 50px) bottom / 100% 9px no-repeat,
        repeating-linear-gradient(90deg, var(--encre) 0 1.5px, transparent 1.5px 100px) bottom / 100% 15px no-repeat;
}

.une-simple {
    padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.une-simple h1 {
    max-width: 24ch;
}

.fil {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.fil a {
    color: var(--encre-3);
    text-decoration: none;
    font-weight: 600;
}

.fil a::before {
    content: "";
    display: inline-block;
    width: 1.1rem;
    height: 2px;
    margin-right: 0.5rem;
    vertical-align: middle;
    background: var(--rouge);
}

.fil a:hover {
    color: var(--rouge);
}

/* ---------------------------------------------------------------------
   Irritants : le crayon rouge barre la façon de faire d'aujourd'hui,
   la ligne en dessous la remplace
   --------------------------------------------------------------------- */

.corrections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 clamp(1.5rem, 3vw, 2.5rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.corrections li {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
    padding: 1rem 0 1.6rem;
    border-top: 1px solid var(--filet-fort);
}

/* Le croquis tient dans la marge, à gauche des deux lignes. */
.croquis-irritant {
    grid-row: span 2;
    width: 3rem;
    height: auto;
    margin-top: 0.15rem;
    fill: none;
    stroke: var(--encre);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.croquis-irritant .plein {
    fill: var(--papier-clair);
}

.croquis-irritant .rouge {
    stroke: var(--rouge);
}

.croquis-irritant .tirets {
    stroke-dasharray: 2 2;
    stroke-linecap: butt;
}

.croquis-irritant .epais {
    stroke-width: 3.5;
    stroke-linecap: butt;
}

.corrections del {
    display: block;
    color: var(--encre-2);
    text-decoration: line-through;
    text-decoration-color: var(--rouge);
    text-decoration-thickness: 2px;
}

.corrections ins {
    display: block;
    margin-top: 0.45rem;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.35;
    text-decoration: none;
}

/* ---------------------------------------------------------------------
   Fiches des démos
   --------------------------------------------------------------------- */

.fiches-demos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fiche-demo {
    position: relative;
    background: var(--papier-clair);
    border: 1px solid var(--filet);
    padding: 1.25rem 1.25rem 1.1rem;
}

.fiche-demo:hover {
    border-color: var(--encre);
}

.fiche-demo h3 {
    font-size: 1.2rem;
    margin-top: 1.1rem;
}

.lien-fiche {
    text-decoration: none;
}

.lien-fiche::after {
    content: "";
    position: absolute;
    inset: 0;
}

.fiche-demo:hover .lien-fiche {
    text-decoration: underline;
    text-decoration-color: var(--rouge);
    text-decoration-thickness: 2px;
}

.fiche-demo p {
    color: var(--encre-2);
    margin-bottom: 0.6rem;
}

.fiche-resultat strong {
    color: var(--vert);
}

.croquis {
    display: block;
    width: 100%;
    height: auto;
}

.croquis-cadre {
    fill: var(--papier);
    stroke: var(--filet);
}

.croquis-filet {
    stroke: var(--filet);
}

.croquis-route-a,
.croquis-route-b {
    fill: none;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.croquis-route-a {
    stroke: var(--encre);
}

.croquis-route-b {
    stroke: var(--t0);
}

.croquis-client {
    fill: var(--papier-clair);
    stroke: var(--encre);
    stroke-width: 1.2;
}

.croquis-depot {
    fill: var(--encre);
}

.croquis-chute {
    fill: none;
    stroke: var(--rouge);
    stroke-dasharray: 2 2;
}

.p0 { fill: var(--t0); }
.p1 { fill: var(--t1); }
.p2 { fill: var(--t2); }
.p3 { fill: var(--t3); }
.p4 { fill: var(--t4); }
.p5 { fill: var(--t5); }
.p6 { fill: var(--t6); }
.p7 { fill: var(--t7); }

/* ---------------------------------------------------------------------
   Réalisations (parcours en entreprise)
   --------------------------------------------------------------------- */

.dossiers {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 2px solid var(--encre);
}

.dossier {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.25rem 1.5rem;
    padding-block: 1.35rem;
    border-bottom: 1px solid var(--filet-fort);
}

.dossier-annees {
    margin: 0;
    padding-top: 0.1rem;
    font-weight: 600;
    color: var(--rouge);
}

.dossier-texte p {
    color: var(--encre-2);
}

.dossier-texte p:last-child {
    margin-bottom: 0;
}

.dossier-outils {
    font-size: 0.92rem;
    color: var(--encre-3) !important;
}

/* ---------------------------------------------------------------------
   Esquisses : un prototype par métier, en capture d'écran
   (le trait rouge marque le problème, le vert ce que l'outil change)
   --------------------------------------------------------------------- */

.esquisses {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 2px solid var(--encre);
}

.esquisse {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
    gap: 1.5rem clamp(2rem, 4vw, 3.5rem);
    align-items: start;
    padding-block: clamp(2rem, 4.5vw, 3rem);
    border-bottom: 1px solid var(--filet-fort);
}

.esquisse h2 {
    font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.8rem);
    margin-bottom: 0.3em;
    scroll-margin-top: 1.5rem;  /* arrivée par un lien de l'accueil (/esquisses#e-limon) */
}

.esquisse-pour {
    font-weight: 600;
    color: var(--rouge);
    margin-bottom: 1.1rem;
}

.esquisse-probleme,
.esquisse-solution {
    position: relative;
    padding-left: 1.45rem;
    color: var(--encre-2);
}

.esquisse-probleme::before,
.esquisse-solution::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 0.8rem;
    height: 2px;
    background: var(--rouge);
}

.esquisse-solution::before {
    background: var(--vert);
}

.esquisse-lien {
    margin: 1.4rem 0 0;
}

.esquisse-image {
    margin: 0;
}

.esquisse-image img {
    width: 100%;
    background: var(--papier-clair);
    border: 1px solid var(--filet-fort);
    padding: 0.4rem;
}

.esquisse-image figcaption {
    margin-top: 0.6rem;
    font-size: 0.92rem;
    color: var(--encre-3);
}

/* Sur l'accueil : une ligne par métier, et trois captures posées en vrac
   sur l'établi (cadre de papier, sans ombre). */
.liste-esquisses {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 2px solid var(--encre);
}

.liste-esquisses li {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    gap: 0.15rem 1.25rem;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--filet-fort);
}

.liste-esquisses a {
    font-weight: 600;
}

.liste-esquisses span {
    color: var(--encre-2);
}

.collage {
    position: relative;
    display: block;
    max-width: 30rem;
    aspect-ratio: 16 / 11;
}

.collage img {
    position: absolute;
    width: 64%;
    background: var(--papier-clair);
    border: 1px solid var(--filet-fort);
    padding: 0.3rem;
}

.collage img:nth-child(1) {
    top: 0;
    left: 0;
    transform: rotate(-2deg);
}

.collage img:nth-child(2) {
    top: 6%;
    right: 0;
    transform: rotate(1.5deg);
}

.collage img:nth-child(3) {
    bottom: 0;
    left: 16%;
    transform: rotate(-0.5deg);
}

.collage:hover img {
    border-color: var(--encre);
}

/* ---------------------------------------------------------------------
   Étapes de la démarche
   --------------------------------------------------------------------- */

.etapes {
    counter-reset: etape;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.etapes li {
    counter-increment: etape;
    border-top: 2px solid var(--encre);
    padding-top: 0.9rem;
}

.etapes li::before {
    content: counter(etape);
    display: block;
    margin-bottom: 0.7rem;
    font: 700 2.4rem/1 var(--serif);
    color: var(--rouge);
}

.etapes p {
    color: var(--encre-2);
}

/* ---------------------------------------------------------------------
   Citation
   --------------------------------------------------------------------- */

.citation {
    margin: 0;
    padding-top: 1.25rem;
    border-top: 2px solid var(--rouge);
}

.citation blockquote {
    margin: 0 0 1.1rem;
}

.citation blockquote p {
    font: italic 400 clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem)/1.28 var(--serif);
    margin: 0;
}

.citation blockquote p::before {
    content: "«\00a0";
}

.citation blockquote p::after {
    content: "\00a0»";
}

.citation figcaption {
    color: var(--encre-2);
    max-width: var(--mesure);
}

/* ---------------------------------------------------------------------
   Questions fréquentes
   --------------------------------------------------------------------- */

.questions details {
    border-top: 1px solid var(--filet-fort);
}

.questions details:last-child {
    border-bottom: 1px solid var(--filet-fort);
}

.questions summary {
    position: relative;
    padding: 1rem 2.5rem 1rem 0;
    font-weight: 600;
    font-size: 1.08rem;
    cursor: pointer;
    list-style: none;
}

.questions summary::-webkit-details-marker {
    display: none;
}

.questions summary::after {
    content: "+";
    position: absolute;
    right: 0.25rem;
    top: 1.05rem;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--rouge);
}

.questions details[open] summary::after {
    content: "−";
}

.questions summary:hover {
    color: var(--rouge);
}

.questions details p {
    color: var(--encre-2);
    margin: 0 0 1.2rem;
}

/* ---------------------------------------------------------------------
   Formulaire de contact
   --------------------------------------------------------------------- */

.formulaire {
    position: relative;
    background: var(--papier-clair);
    border: 1px solid var(--filet);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.champs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.25rem;
}

.champ {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: none;
    margin: 0 0 1.1rem;
}

.champ-large {
    grid-column: 1 / -1;
}

.champ label {
    font-weight: 600;
    font-size: 0.97rem;
}

.facultatif {
    margin-left: 0.35rem;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--encre-3);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    font: inherit;
    color: var(--encre);
    background: #fff;
    border: 1px solid var(--filet-fort);
    border-radius: 2px;
    padding: 0.65rem 0.75rem;
}

input:focus,
textarea:focus {
    border-color: var(--encre);
}

textarea {
    resize: vertical;
    min-height: 8rem;
}

::placeholder {
    color: var(--encre-3);
    opacity: 1;
}

.pot-de-miel {
    position: absolute;
    left: -9999px;
}

.formulaire-envoi {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.formulaire-etat {
    margin: 0;
    font-weight: 600;
}

.formulaire-etat:empty {
    display: none;
}

.formulaire-etat.erreur {
    color: var(--rouge);
}

.formulaire-mention {
    margin: 1.25rem 0 0;
    font-size: 0.88rem;
    color: var(--encre-3);
}

.formulaire-merci h3 {
    font: 700 1.5rem/1.2 var(--serif);
}

.coordonnees {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.coordonnees li {
    padding: 0.55rem 0;
    border-top: 1px solid var(--filet);
}

.coordonnees-type {
    display: inline-block;
    min-width: 6.5rem;
    color: var(--encre-3);
    font-size: 0.92rem;
}

.coordonnees a {
    font-weight: 600;
}

.liste-sobre {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    max-width: var(--mesure);
}

.liste-sobre li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.6rem;
    border-top: 1px solid var(--filet);
}

.liste-sobre li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15rem;
    width: 0.85rem;
    height: 2px;
    background: var(--rouge);
}

.contact-portrait {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 0;
}

.contact-portrait img {
    width: 6rem;
}

.contact-portrait figcaption {
    font: 700 1.1rem/1.2 var(--serif);
}

/* ---------------------------------------------------------------------
   Appel à l'action (fin de page)
   --------------------------------------------------------------------- */

.appel {
    background: var(--encre);
    color: var(--papier);
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.appel-cadre {
    display: flex;
    align-items: center;
    gap: 1.5rem 2.5rem;
}

.appel-photo {
    flex: none;
    width: 7rem;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--papier-clair);
    border: 3px solid var(--papier);
}

.appel h2 {
    margin-bottom: 0.4em;
}

.appel p {
    color: #d9d3c6;
}

.appel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin: 1.4rem 0 0;
}

.appel .bouton {
    background: var(--papier);
    color: var(--encre);
    border-color: var(--papier);
}

.appel .bouton:hover {
    background: var(--rouge);
    border-color: var(--rouge);
    color: #fff;
}

.appel .precision {
    color: #bdb6a7;
}

.appel a:focus-visible {
    outline-color: var(--papier);
}

/* ---------------------------------------------------------------------
   Pages À propos, confidentialité, introuvable
   --------------------------------------------------------------------- */

.lecons h3 {
    font: 700 1.3rem/1.3 var(--serif);
    margin-top: 1.75rem;
}

.lecons h3:first-child {
    margin-top: 0;
}

.lecons p {
    color: var(--encre-2);
}

.texte-long {
    max-width: 46rem;
}

.texte-long h2 {
    font-size: 1.45rem;
    margin-top: 2.5rem;
}

.texte-long ul {
    padding-left: 1.2rem;
}

.texte-long li {
    margin-bottom: 0.5rem;
}

.liens-utiles li {
    padding-block: 0.75rem;
}

/* ---------------------------------------------------------------------
   Pied de page : le cartouche d'un plan
   --------------------------------------------------------------------- */

.pied {
    background: var(--papier-fonce);
    border-top: 1px solid var(--filet);
    padding-block: 2.75rem 2.5rem;
}

.cartouche {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr);
    border: 1.5px solid var(--encre);
    background: var(--papier);
}

.cartouche-titre {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--encre);
}

.cartouche-titre img {
    flex: none;
    width: 3.6rem;
}

.cartouche-titre strong {
    display: block;
    font: 700 1.15rem/1.2 var(--serif);
}

.cartouche-titre span {
    display: block;
    font-size: 0.92rem;
    color: var(--encre-2);
}

.cartouche-cases {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.cartouche-cases > div {
    padding: 0.8rem 1rem;
    border-left: 1px solid var(--filet-fort);
}

.cartouche-cases > div:first-child {
    border-left: 0;
}

.cartouche-cases dt {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--encre-3);
}

.cartouche-cases dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
}

.cartouche-liens {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid var(--encre);
}

.cartouche-liens a {
    font-weight: 600;
    text-decoration: none;
}

.cartouche-liens a:hover {
    text-decoration: underline;
}

.cartouche-note {
    grid-column: 1 / -1;
    max-width: none;
    margin: 0;
    padding: 0.7rem 1.25rem;
    border-top: 1px solid var(--filet-fort);
    font-size: 0.88rem;
    color: var(--encre-3);
}

/* ---------------------------------------------------------------------
   Statistiques (page privée)
   --------------------------------------------------------------------- */

.stats-barres {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--encre);
}

.stats-barres rect {
    fill: var(--encre);
}

.stats-barres rect:hover {
    fill: var(--rouge);
}

.stats-barres text {
    font: 400 9px var(--sans);
    fill: var(--encre-3);
}

.tableau-stats {
    width: 100%;
    border-collapse: collapse;
}

.tableau-stats th,
.tableau-stats td {
    text-align: left;
    padding: 0.45rem 0.5rem 0.45rem 0;
    border-bottom: 1px solid var(--filet);
}

.tableau-stats .num {
    text-align: right;
}

/* ---------------------------------------------------------------------
   Erreur Blazor (démos seulement)
   --------------------------------------------------------------------- */

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    padding: 0.8rem var(--gouttiere);
    background: var(--rouge);
    color: #fff;
}

#blazor-error-ui a {
    color: #fff;
    font-weight: 600;
    margin-left: 0.75rem;
}

#blazor-error-ui .dismiss {
    float: right;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------------------------------------------------------------------
   Écrans moyens et petits
   --------------------------------------------------------------------- */

@media (max-width: 56rem) {
    .une-cadre,
    .deux-colonnes {
        grid-template-columns: minmax(0, 1fr);
    }

    .une-portrait {
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 1rem;
        max-width: none;
    }

    .une-portrait img {
        width: 5.5rem;
        padding: 0.25rem;
    }

    /* Sur la page À propos, le visage est le sujet : il reste grand. */
    .une-portrait-grand img {
        width: 10rem;
        padding: 0.35rem;
    }

    .une-portrait figcaption {
        margin: 0;
    }

    .etapes,
    .corrections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .esquisse {
        grid-template-columns: minmax(0, 1fr);
    }

    .cartouche {
        grid-template-columns: minmax(0, 1fr);
    }

    .cartouche-titre {
        border-right: 0;
        border-bottom: 1px solid var(--encre);
    }
}

@media (max-width: 40rem) {
    body {
        font-size: 1rem;
    }

    p {
        hyphens: auto;
    }

    .marque-role {
        display: none;
    }

    .nav {
        gap: 1.1rem;
    }

    .etapes {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .champs {
        grid-template-columns: minmax(0, 1fr);
    }

    .dossier {
        grid-template-columns: minmax(0, 1fr);
    }

    .esquisse-image img {
        padding: 0.25rem;
    }

    .liste-esquisses li {
        grid-template-columns: minmax(0, 1fr);
    }

    .appel-cadre {
        flex-direction: column;
        align-items: flex-start;
    }

    .cartouche-cases {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cartouche-cases > div:nth-child(3) {
        border-left: 0;
    }

    .cartouche-cases > div:nth-child(n + 3) {
        border-top: 1px solid var(--filet-fort);
    }

    .corrections {
        grid-template-columns: minmax(0, 1fr);
    }

    .corrections li {
        padding-bottom: 1.1rem;
    }
}

@media print {
    .entete nav,
    .appel,
    .formulaire,
    .cartouche-liens,
    #blazor-error-ui {
        display: none !important;
    }

    body,
    .section-parcours,
    .pied {
        background: #fff;
    }
}
