/* MEMORA solutions (info@memora.ca) - https://memora.solutions
   Plugin Moodle filter_lvcomposants : feuille de style des composants lvc.
   Charte partagée de laveille avec valeurs de repli locales. */

/* MEMORA solutions
   Composants de contenu « lvc » pour les pages Moodle 5.1 (thème laveille, base Boost).
   Toutes les règles sont limitées au conteneur .lvc. Référence visuelle à intégrer au plugin. */

.lvc { box-sizing: border-box; max-width: 100%; overflow-wrap: break-word; font-family: var(--f-body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif); font-size: 16px; line-height: 1.7; color: var(--c-dark, #1A1D23); }
.lvc h1, .lvc h2, .lvc h3 { font-family: var(--f-heading, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif); }
.lvc *, .lvc *::before, .lvc *::after { box-sizing: inherit; }

/* Images : jamais de débordement (corrige la barre de défilement horizontale des bannières) */
.lvc img { max-width: 100%; height: auto; }
.lvc .lvc-banniere { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin: 0 0 0.5rem; }

/* Introduction et raccourcis */
.lvc .lvc-intro { font-size: 1.15em; margin: 0 0 1rem; }
.lvc .lvc-raccourcis { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.lvc .lvc-raccourcis a { display: inline-block; padding: 0.45rem 1rem; border-radius: 999px; background: var(--c-neutral-light, #ECEEF2); color: var(--c-primary, #064E5A); text-decoration: none; font-weight: 600; transition: background-color 0.2s ease; }
.lvc .lvc-raccourcis a:hover, .lvc .lvc-raccourcis a:focus-visible { background: var(--c-primary-badge, #DDF4F8); }

/* Cartes de situations */
.lvc .lvc-cartes { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin: 1.5rem 0; }
@media (min-width: 700px) { .lvc .lvc-cartes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .lvc .lvc-cartes { grid-template-columns: repeat(3, 1fr); } }
.lvc .lvc-carte { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem 1.25rem 1rem; border: 1px solid var(--c-primary-badge, #DDF4F8); border-top: 4px solid var(--c-primary, #064E5A); border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); scroll-margin-top: 5rem; }
.lvc .lvc-carte h3 { margin: 0; color: var(--c-primary, #064E5A); font-size: 1.1em; }
.lvc .lvc-carte ul { display: grid; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.lvc .lvc-carte li a { text-decoration: none; display: block; padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--c-primary, #064E5A); text-decoration: none; }
.lvc .lvc-carte li a::after { content: "\00a0→"; }
.lvc .lvc-carte li a:hover, .lvc .lvc-carte li a:focus-visible { background: var(--c-primary-light, #F0FAFB); text-decoration: underline; }

/* Encadrés - système unifié (demande fondateur 2026-10-22) : chaque type = fond sobre + accent de
   couleur + une ICÔNE. Les icônes sont des SVG EN LIGNE (aucune dépendance externe, aucune requête
   réseau), monochromes et RECOLORÉES par CSS via mask-image selon --lvc-accent (DRY : une seule règle
   d'icône, chaque type ne fournit que sa forme + sa couleur). Réutilisable tel quel dans un autre
   Moodle. MEMORA solutions. */
.lvc .lvc-aide, .lvc .lvc-forum, .lvc .lvc-depart, .lvc .lvc-resultat, .lvc .lvc-verifier, .lvc .lvc-astuce, .lvc .lvc-retenir, .lvc .lvc-situation, .lvc .lvc-encadre {
    position: relative; margin: 1.25rem 0; padding: 1.1rem 1.4rem 1.1rem 3.5rem; border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); border-left: 4px solid var(--lvc-accent, var(--c-primary, #064E5A));
}
/* Icône posée sur la BOÎTE (donc présente même sans titre) ; teintée par --lvc-accent. */
.lvc .lvc-aide::before, .lvc .lvc-forum::before, .lvc .lvc-depart::before, .lvc .lvc-resultat::before, .lvc .lvc-verifier::before, .lvc .lvc-astuce::before, .lvc .lvc-retenir::before, .lvc .lvc-situation::before, .lvc .lvc-encadre::before {
    content: ""; position: absolute; left: 1.15rem; top: 1.15rem; width: 1.35rem; height: 1.35rem; flex: none;
    background-color: var(--lvc-accent, var(--c-primary, #064E5A));
    -webkit-mask: var(--lvc-icon) center / contain no-repeat; mask: var(--lvc-icon) center / contain no-repeat;
}
.lvc .lvc-aide { --lvc-accent: var(--c-accent, #9A2A06); background: var(--c-accent-light, #FDF5ED); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.lvc .lvc-forum { --lvc-accent: var(--c-primary, #064E5A); background: var(--c-primary-light, #F0FAFB); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E"); }
.lvc .lvc-situation { --lvc-accent: var(--c-primary, #064E5A); background: var(--c-primary-light, #F0FAFB); font-size: 1.1em; --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76'/%3E%3C/svg%3E"); }
.lvc .lvc-depart { --lvc-accent: var(--c-text-secondary, #4a4f5c); background: var(--c-neutral-light, #ECEEF2); color: var(--c-text-secondary, #4a4f5c); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='10 8 16 12 10 16 10 8'/%3E%3C/svg%3E"); }
.lvc .lvc-resultat { --lvc-accent: var(--c-primary, #064E5A); background: var(--c-primary-light, #F0FAFB); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.lvc .lvc-verifier { --lvc-accent: var(--c-accent, #9A2A06); background: var(--c-accent-light, #FDF5ED); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.lvc .lvc-verifier h3 { margin-top: 0; color: var(--c-accent, #9A2A06); }
.lvc .lvc-astuce { --lvc-accent: var(--c-primary, #064E5A); background: var(--c-primary-light, #F0FAFB); font-size: 0.95em; --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5.76.76 1.23 1.52 1.41 2.5'/%3E%3C/svg%3E"); }
.lvc .lvc-encadre { --lvc-accent: var(--c-primary, #064E5A); background: var(--c-surface, #F8FAFB); --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E"); }
.lvc .lvc-retenir { --lvc-accent: var(--c-primary-badge, #DDF4F8); background: var(--c-primary, #064E5A); color: #fff; --lvc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.lvc .lvc-retenir p { color: #fff; margin: 0.2rem 0; }
.lvc .lvc-retenir a { color: var(--c-primary-badge, #DDF4F8); text-decoration: underline; }
.lvc .lvc-etiquette { font-size: 0.75em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-primary-badge, #DDF4F8) !important; }
.lvc h3 { color: var(--c-primary, #064E5A); }
/* Correctif AA : titre des encadrés à fond teal foncé en blanc (sinon le h3 hérite du teal #064E5A = ~1,8:1, sous AA). Blanc sur #064E5A = 8,9:1. */
.lvc .lvc-retenir h3 { color: #fff !important; }
.lvc .lvc-retenir > h3::after { color: var(--c-primary-badge, #DDF4F8) !important; }

/* Correctif AA scope (D-20261026-03, GO laveille) : dans un encadre a fond colore pose EN INLINE par
   l'auteur (ex. bandeau d'intro), les titres suivent la couleur de l'encadre au lieu du gris fonce
   force par le theme (regle agregee h1..h6{color:#1A1D23 !important}). color:inherit => JAMAIS de blanc
   global : un encadre clair garde ses titres fonces. Scope .no-overflow = contenu AUTEUR seulement
   (jamais les tuiles / nav / en-tete). Mesure live 2026-10-26 cmid 286 : h3 force a #1A1D23 sur #14233D
   = 1,08:1 ; apres correctif, le #fff inline de l'auteur reprend le dessus = ~15:1. Specificite (0,2,1)
   + !important bat la regle theme (0,0,1) + !important. */
.no-overflow [style*="background"] h1,
.no-overflow [style*="background"] h2,
.no-overflow [style*="background"] h3,
.no-overflow [style*="background"] h4,
.no-overflow [style*="background"] h5,
.no-overflow [style*="background"] h6 { color: inherit !important; }

/* Bouton Copier universel sur les blocs de code (hors .lvc-a-copier) - MEMORA solutions.
   Le bouton vit dans l'enrobage .lvc-prebloc, HORS du <pre>, pour que la sélection manuelle
   du code (appli mobile Moodle) n'inclue jamais le libellé du bouton. */
.lvc-prebloc { position: relative; margin: 1.5rem 0; }
/* Encadré net : contour hairline + ombre douce en couches (tendance 2026) pour bien SÉPARER le bloc
   du reste du texte. AUCUN scroll vertical : plafond de hauteur retiré, contenu COMPLET visible ;
   les longues lignes reviennent à la ligne (donc pas de scroll horizontal non plus). La copie reste
   exacte, le JS copie le textContent (le retour à la ligne est purement visuel). */
.lvc-prebloc pre { margin: 0; padding: 2.6rem 1.2rem 1.2rem; background: var(--c-surface, #F8FAFB); color: var(--c-dark, #1A1D23); border: 1px solid var(--c-border-light, #CDE9EF); border-radius: 14px; box-shadow: 0 1px 2px rgba(6, 78, 90, 0.05), 0 6px 20px rgba(6, 78, 90, 0.08); max-height: none; overflow: visible; font-size: 0.95em; line-height: 1.6; }
.lvc-prebloc pre, .lvc-prebloc pre code { white-space: pre-wrap; word-break: break-word; }
.lvc-prebloc .lvc-copier { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; min-height: 24px; padding: 0.3rem 0.75rem; border: none; border-radius: 6px; background: var(--c-primary, #064E5A); color: #fff; font-size: 0.85em; font-weight: 600; cursor: pointer; font-family: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.lvc-prebloc .lvc-copier:hover, .lvc-prebloc .lvc-copier:focus-visible { background: var(--c-primary-hover, #032E36); }
.lvc-prebloc .lvc-copier:focus-visible { outline: 2px solid var(--c-primary-badge, #DDF4F8); outline-offset: 2px; }
.lvc-prebloc .lvc-copier.lvc-copie-ok { background: var(--c-success, #065F46); }
/* Sélection manuelle : ne jamais happer le libellé du bouton (appli mobile Moodle) */
.lvc-copier { user-select: none; -webkit-user-select: none; }
/* Cible tactile confortable pour le bouton des blocs de code */
.lvc-prebloc .lvc-copier { min-height: 40px; }

/* MEMORA solutions : carte unifiée, formulaire étiqueté et aperçu en direct. */
.lvc-gab, .lvc-prebloc.lvc-gab { box-sizing: border-box; min-width: 0; max-width: 100%; margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--c-border-light, #CDE9EF); border-radius: 12px; background: #fff; box-shadow: none; overflow-wrap: anywhere; }
.lvc-gab-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.75rem; margin: 0 0 1rem; font-size: 0.92em; }
.lvc-gab-consigne { color: var(--c-text-secondary, #4a4f5c); }
.lvc-gab-compte { color: var(--c-primary, #064E5A); font-weight: 700; font-variant-numeric: tabular-nums; }
.lvc-gab-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0 0 1rem; }
@media (min-width: 480px) { .lvc-gab-form { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); } }
.lvc-gab-ligne { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.lvc-gab-label { margin: 0; font-size: 0.9em; font-weight: 600; color: var(--c-dark, #1A1D23); }
/* MEMORA solutions : groupes de choix en colonne, avec cibles tactiles et légende accessible. */
.lvc-gab-groupe { box-sizing: border-box; width: 100%; min-width: 0; border: 0; padding: 0; margin: 0; }
.lvc-gab-legende { float: none; width: auto; padding: 0; margin: 0 0 .35rem; font-size: 0.9em; font-weight: 600; color: var(--c-dark, #1A1D23); }
.lvc-gab-option { display: flex; align-items: center; gap: .5rem; min-height: 40px; margin: 0; cursor: pointer; font: inherit; font-weight: normal; }
.lvc-gab-option input[type="radio"], .lvc-gab-option input[type="checkbox"] { width: auto; min-height: auto; accent-color: var(--c-primary, #064E5A); margin: 0; }

.lvc-gab .lvc-champ { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; margin: 0; padding: 0.5rem 0.65rem; border: 1px solid var(--c-border-light, #CDE9EF); border-radius: 6px; background: #fff; color: var(--c-dark, #1A1D23); font: inherit; }
/* Contour de focus UNIQUE, teal, collé au champ : écrase le focus global rouille (active-focus-sober,
   3px #9A2A06) et le décalage qui créaient un DOUBLE contour. offset 0 + bordure teal = un seul anneau. */
.lvc-gab .lvc-champ:focus,
.lvc-gab .lvc-champ:focus-visible {
    outline: 2px solid var(--c-primary, #064E5A) !important;
    outline-offset: 0 !important;
    border-color: var(--c-primary, #064E5A);
    box-shadow: none !important;
}
.lvc-gab textarea.lvc-champ { resize: vertical; }
.lvc-gab select.lvc-champ { cursor: pointer; }
.lvc-gab .lvc-gab-apercu, .lvc .lvc-gab .lvc-gab-apercu { box-sizing: border-box; min-width: 0; max-width: 100%; margin: 0; padding: 1rem; border: 0; border-radius: 8px; background: var(--c-surface, #F8FAFB); color: var(--c-dark, #1A1D23); box-shadow: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; overflow: visible; }
.lvc-gab-apercu code { white-space: pre-wrap; overflow-wrap: anywhere; }
.lvc-gab-jeton { padding: 0 .2em; border-radius: 3px; background: var(--c-primary-badge, #DDF4F8); color: var(--c-primary, #064E5A); }
.lvc-gab-jeton--vide { background: var(--c-neutral-light, #ECEEF2); color: var(--c-text-secondary, #4a4f5c); text-decoration: underline dotted; text-underline-offset: 0.2em; }
.lvc-gab-pied { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.lvc-gab .lvc-gab-pied .lvc-copier, .lvc-gab-reinit { position: static; min-height: 44px; max-width: 100%; padding: 0.5rem 1rem; border: 1px solid var(--c-primary, #064E5A); border-radius: 6px; background: var(--c-primary, #064E5A); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: none; white-space: normal; }
.lvc-gab .lvc-gab-pied .lvc-copier:hover { background: var(--c-primary-hover, #032E36); }
.lvc-gab .lvc-gab-pied .lvc-copier.lvc-copie-ok { background: var(--c-success, #065F46); }
.lvc-gab .lvc-gab-reinit { background: #fff; color: var(--c-primary, #064E5A); border-color: var(--c-border-light, #CDE9EF); }
.lvc-gab .lvc-gab-reinit:hover { background: var(--c-primary-light, #F0FAFB); }
.lvc-gab-pied .lvc-copier:focus-visible, .lvc-gab-reinit:focus-visible { outline: 2px solid var(--c-primary, #064E5A); outline-offset: 2px; }

/* Toast visuel UNIQUE, en BAS au centre : ne couvre jamais la barre fixe du haut ; un seul à la
   fois (l'élément est réutilisé en JS). pointer-events:none. Blanc sur #064E5A = 8,9:1. MEMORA. */
.lvc-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 1080; max-width: 90vw; padding: 0.6rem 1.1rem; border-radius: 8px; background: var(--c-primary, #064E5A); color: #fff; font-size: 0.95rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
.lvc-toast.lvc-toast-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lvc-toast { transition: none; } }
.lvc a { color: var(--c-primary, #064E5A); text-decoration: underline; text-underline-offset: 2px; }
.lvc a:hover, .lvc a:focus-visible { color: var(--c-primary-hover, #032E36); }

/* Demande à copier */
.lvc .lvc-demande { margin: 1.25rem 0; padding: 1.25rem 1.4rem; border: 2px solid var(--c-primary, #064E5A); border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.lvc .lvc-demande h3 { margin-top: 0; }
.lvc .lvc-demande h3::before { content: "📋 "; }
.lvc .lvc-consigne { margin: 0.25rem 0 0.75rem; font-size: 0.9em; color: var(--c-text-secondary, #4a4f5c); }
.lvc .lvc-a-copier { position: relative; padding: 0.9rem 6.5rem 0.9rem 1rem; border: 1px dashed var(--c-primary, #064E5A); border-radius: 8px; background: var(--c-surface, #F8FAFB); font-size: 0.97em; }
.lvc .lvc-a-copier p { margin: 0.3rem 0; }
.lvc .lvc-copier { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.35rem 0.8rem; border: none; border-radius: 6px; background: var(--c-primary, #064E5A); color: #fff; font-size: 0.85em; font-weight: 600; cursor: pointer; font-family: inherit; }
.lvc .lvc-copier:hover, .lvc .lvc-copier:focus-visible { background: var(--c-primary-hover, #032E36); }
.lvc .lvc-copier.lvc-copie-ok { background: var(--c-success, #065F46); }

/* Pastilles */
.lvc .lvc-meta { margin: 0 0 0.75rem; }
.lvc .lvc-pastille { display: inline-block; margin: 0 0.3rem 0.3rem 0; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--c-neutral-light, #ECEEF2); color: var(--c-text-secondary, #4a4f5c); font-size: 0.85em; }
.lvc .lvc-pastille.lvc-date { background: var(--c-primary-badge, #DDF4F8); color: var(--c-primary, #064E5A); }
.lvc .lvc-note { font-size: 0.9em; font-style: italic; color: var(--c-text-secondary, #4a4f5c); font-weight: normal; }

/* Tableaux */
.lvc .lvc-tableau { width: 100%; margin: 1.25rem 0; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); }
.lvc .lvc-tableau th, .lvc .lvc-tableau td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--c-neutral-light, #ECEEF2); text-align: left; vertical-align: top; }
.lvc .lvc-tableau th { background: var(--c-primary-light, #F0FAFB); color: var(--c-primary, #064E5A); font-weight: 600; width: 32%; }
.lvc .lvc-tableau tr:last-child th, .lvc .lvc-tableau tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
  .lvc .lvc-tableau, .lvc .lvc-tableau tbody, .lvc .lvc-tableau tr, .lvc .lvc-tableau th, .lvc .lvc-tableau td { display: block; width: 100%; }
  .lvc .lvc-tableau tr { border-bottom: 1px solid var(--c-primary-badge, #DDF4F8); }
  .lvc .lvc-tableau th { border-bottom: none; padding-bottom: 0.2rem; }
  .lvc .lvc-a-copier { padding-right: 1rem; padding-top: 2.6rem; }
}

/* Sections repliables - motif accordéon accessible GOV.UK / WAI-ARIA APG (#197 MEMORA solutions).
   Le JS place un vrai <button> pleine largeur DANS le <h3> : en-tête clairement cliquable, libellé
   visible « Afficher / Masquer le contenu » et chevron d'état. Trois indices (surface, verbe, icône)
   plutôt que le seul petit chevron d'avant. Confiné à .lvc, tokens de charte avec repli local. */
/* #218 (MEMORA solutions, 2026-11-06) - aération inter-cartes : chaque carte repliable porte son
   propre espace sous elle, pour que les cartes FERMÉES ne se collent plus (le défaut d'avant laissait
   margin 0 sur les en-têtes fermés, donc les cartes se touchaient). */
.lvc .lvc-repliable { margin: 0 0 0.85rem; }
.lvc .lvc-repliable:last-child { margin-bottom: 0; }
.lvc .lvc-repliable > h3 { margin: 0 0 0.75rem; padding: 0; }
.lvc .lvc-repliable.lvc-ferme > h3 { margin: 0; }
.lvc .lvc-repliable.lvc-ferme > *:not(h3) { display: none; }
.lvc .lvc-rep-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    width: 100%; min-height: 44px; margin: 0; padding: 0.85rem 1.1rem;
    border: 1px solid var(--c-border-light, #CDE9EF); border-left: 4px solid var(--c-primary, #064E5A);
    border-radius: 10px; background: var(--c-primary-light, #F0FAFB);
    font: inherit; font-family: inherit; text-align: left; cursor: pointer; color: inherit;
}
.lvc .lvc-rep-btn:hover, .lvc .lvc-rep-btn:focus-visible { background: var(--c-primary-badge, #DDF4F8); }
.lvc .lvc-rep-btn:focus-visible { outline: 3px solid var(--c-primary, #064E5A); outline-offset: 2px; }
/* #218 : titre de carte repliable à taille EXPLICITE (avant, il héritait du h3 de Moodle, trop gros). */
.lvc .lvc-rep-titre { font-weight: 700; color: var(--c-primary, #064E5A); line-height: 1.4; font-size: 1.125rem; }
.lvc .lvc-rep-cmd { display: inline-flex; align-items: center; gap: 0.45rem; flex: none; }
.lvc .lvc-rep-action { font-size: 0.8rem; font-weight: 600; color: var(--c-primary, #064E5A); white-space: nowrap; }
.lvc .lvc-rep-chevron {
    display: inline-flex; width: 1.6rem; height: 1.6rem; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--c-primary-badge, #DDF4F8); color: var(--c-primary, #064E5A);
    flex: none; transition: transform 0.12s ease;
}
.lvc .lvc-repliable.lvc-ferme .lvc-rep-chevron { transform: rotate(-90deg); }
/* Encadré déjà coloré (ex. .lvc-resultat) : pas de bouton-boîte imbriqué, on garde le libellé + chevron. */
.lvc .lvc-resultat > h3 .lvc-rep-btn { background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 44px; }
.lvc .lvc-resultat > h3 .lvc-rep-btn:hover { background: transparent; }
@media (max-width: 480px) {
    .lvc .lvc-rep-btn { flex-wrap: wrap; }
    .lvc .lvc-rep-titre { flex: 1 1 100%; }
    .lvc .lvc-rep-cmd { margin-top: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) { .lvc *, .lvc *::before, .lvc *::after { transition-duration: 0.01ms !important; } }

/* #22 (MEMORA solutions) - STANDARD des captures d'écran : miniature PETITE par défaut, agrandie au
   clic (lightbox). Le fondateur veut des miniatures qui ne « mangent » pas la page. Défaut plafonné à
   320px et centré ; lvc-capture-large pour les rares captures à garder grandes. max-width (jamais width)
   pour ne pas agrandir une petite image ; min(320px, 100%) pour le responsive. Spécificité > .lvc img. */
.lvc .lvc-capture { text-align: center; }
.lvc .lvc-capture a { display: inline-block; max-width: 100%; }
.lvc .lvc-capture img { display: block; max-width: min(320px, 100%); height: auto; margin-inline: auto; }
.lvc .lvc-capture.lvc-capture-large img { max-width: 100%; }

/* #287 (MEMORA solutions) - lecteur d'image EN PAGE (lightbox). Overlay au niveau du <body> (hors .lvc) :
   sélecteurs NON confinés. z-index au-dessus de la barre fixe (1030) et du toast (1080). */
.lvc-capture a { cursor: zoom-in; }
body.lvc-lightbox-ouvert { overflow: hidden; }
.lvc-lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2.5rem 1rem 1rem; background: rgba(10, 14, 20, 0.88); }
.lvc-lightbox.lvc-lightbox-visible { display: flex; }
.lvc-lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; max-width: 96vw; max-height: 92vh; }
.lvc-lightbox-img { max-width: 96vw; max-height: 82vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); background: #fff; }
.lvc-lightbox-legende { color: #fff; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 0.95rem; line-height: 1.5; text-align: center; max-width: 60ch; }
.lvc-lightbox-legende:empty { display: none; }
.lvc-lightbox-fermer { position: fixed; top: 0.75rem; right: 0.9rem; z-index: 2001; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lvc-lightbox-fermer:hover, .lvc-lightbox-fermer:focus-visible { background: rgba(255, 255, 255, 0.3); }
.lvc-lightbox-fermer:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .lvc-lightbox.lvc-lightbox-visible { animation: lvc-lightbox-apparition 0.15s ease; } }
@keyframes lvc-lightbox-apparition { from { opacity: 0; } to { opacity: 1; } }

/* #288 (MEMORA solutions) - COMMANDE EN LIGNE copiable : un <code> cité dans la prose
   (ex. « tapez docker --version ») devient cliquable pour copier son contenu. Affordance
   TOUJOURS visible (icône ⧉) pour que le tactile sache que c'est cliquable sans survol.
   Icône INLINE (pas absolue) : survit au retour à la ligne d'une commande longue (URL).
   Non confiné à .lvc : la passe #288 tourne sur #region-main (zone de contenu du cours). */
code.lvc-cmd { cursor: pointer; padding: 0.08em 0.5em; border: 1px solid var(--c-border-light, #CDE9EF); border-radius: 6px; background: var(--c-primary-light, #F0FAFB); color: var(--c-primary, #064E5A); font-size: 0.92em; overflow-wrap: anywhere; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
code.lvc-cmd::after { content: " \29C9"; margin-left: 0.3em; opacity: 0.55; font-weight: 400; }
code.lvc-cmd:hover, code.lvc-cmd:focus-visible { background: var(--c-primary-badge, #DDF4F8); border-color: var(--c-primary-hover, #032E36); }
code.lvc-cmd:hover::after, code.lvc-cmd:focus-visible::after { opacity: 1; }
code.lvc-cmd:focus-visible { outline: 2px solid var(--c-primary-hover, #032E36); outline-offset: 2px; }
code.lvc-cmd.lvc-cmd-ok { background: var(--c-success, #065F46); border-color: var(--c-success, #065F46); color: #fff; }
code.lvc-cmd.lvc-cmd-ok::after { content: " \2713"; opacity: 1; }
@media (prefers-reduced-motion: reduce) { code.lvc-cmd { transition: none; } }
