/* /assets/css/style_global.css */
/* ==============
   STYLE GLOBAL
   ============== */


:root {
  --bs-blue: rgb(13, 110, 253);
  --bs-lightgray: 248, 249, 250;
  --bs-indigo: 79, 70, 229;
  --bs-cyan: 6, 182, 212;
  --bs-softblue: 224, 231, 255;
  --bs-violet: 99, 102, 241;
  --bs-white: 255, 255, 255;

  --scroll-offset: 0px;
}

[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* Bouton retour en haut */
#retour {
  margin: 0;
  padding: 10px 0;
  font-size: 1em;
}

/* Fil d’Ariane */
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: rgb(var(--bs-blue)); }
.breadcrumb-item.active { color: rgb(var(--bs-blue)); }
.breadcrumb-item:last-child a {
  color: rgb(var(--bs-blue));
  pointer-events: none;
  cursor: default;
}

/* Typographie et fond global */
body {
  font-family: 'Roboto', sans-serif;
  background-color: rgb(var(--bs-lightgray));
}

/* Gradient texte */
.text-gradient {
  background: linear-gradient(45deg, rgb(var(--bs-indigo)), rgb(var(--bs-cyan)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Timeline */
.timeline-item {
  border-left: 2px solid rgb(var(--bs-softblue));
  padding-bottom: 2rem;
  padding-left: 2rem;
  position: relative;
}
.timeline-item:last-child { border-left: 0; padding-bottom: 0; }
.timeline-marker {
  width: 1rem; height: 1rem;
  background: rgb(var(--bs-white));
  border: 2px solid rgb(var(--bs-violet));
  border-radius: 50%;
  position: absolute;
  left: -0.55rem; top: 0;
}


/* ===================================================
   CLASSES DE COULEURS LIÉES AUX MATIÈRES ET RUBRIQUES
   (MISES À JOUR pour inclure extra-light et extra-dark)
   =================================================== */

/* Fonds */
.bg-extra-light { background-color: rgb(var(--extra-light)) !important; }
.bg-light      { background-color: rgb(var(--light))       !important; }
.bg-base       { background-color: rgb(var(--base))        !important; }
.bg-dark       { background-color: rgb(var(--dark))        !important; }
.bg-extra-dark { background-color: rgb(var(--extra-dark))  !important; }
.bg-accent     { background-color: rgb(var(--accent))      !important; }

/* Texte */
.text-extra-light { color: rgb(var(--extra-light)) !important; }
.text-light      { color: rgb(var(--light))       !important; }
.text-base       { color: rgb(var(--base))        !important; }
.text-dark       { color: rgb(var(--dark))        !important; }
.text-extra-dark { color: rgb(var(--extra-dark))  !important; }
.text-accent     { color: rgb(var(--accent))      !important; }

/* Bordures */
.border-extra-light { border-color: rgb(var(--extra-light)) !important; }
.border-light      { border-color: rgb(var(--light))       !important; }
.border-base       { border-color: rgb(var(--base))        !important; }
.border-dark       { border-color: rgb(var(--dark))        !important; }
.border-extra-dark { border-color: rgb(var(--extra-dark))  !important; }
.border-accent     { border-color: rgb(var(--accent))      !important; }


/* ===================
   CARTES UNIFIÉES
   =================== */

/* Base des cartes */
.card-rubrique, .card-exercice {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 .25rem .5rem rgba(0,0,0,.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet hover (uniformisé) */
.card-rubrique:hover, .card-exercice:hover {
  transform: translateY(-5px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* Barre décorative */
.card-bar {
  height: 6px;
  width: 100%;
  border-radius: 4px 4px 0 0;
}

/* Icônes circulaires */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  flex-shrink: 0;
  font-family: monospace, "Courier New", Consolas, monospace;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.card-icon-sm { width: 2rem; height: 2rem; font-size: 1rem; }
.card-icon-md { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
.card-icon-lg { width: 3rem; height: 3rem; font-size: 1.5rem; }
.card-icon-xl { width: 3.5rem; height: 3.5rem; font-size: 1.75rem; }
.card-icon i { color: inherit; }

/* SVG dans pastille */
.card-icon .card-icon-img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

/* Liens */
a.card-link {
  text-decoration: none;
  position: relative;
  padding-left: 1.5em;
}
a.card-link::before {
  content: "🔎";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 0.25em;
}

/* Flèche animée */
.hover-arrow {
  transition: transform 0.2s, color 0.2s;
  display: inline-block;
}
.card-rubrique:hover .hover-arrow,
.card-exercice:hover .hover-arrow {
  transform: translateX(5px);
}
.hover-arrow:hover {
  transform: translateX(10px) scale(1.2);
  color: var(--accent);
}


/* =================================
   CLASSES DES HEROS EN TÊTE DE PAGE
   ================================= */
/* Hero image */
.hero-img { max-width: 100%; height: auto; }
@media (max-width: 767.98px) {
  .hero-img { max-width: 100px; height: auto; float: right; margin: 0 0 1rem 1rem; }
}

/* Ombres drop-shadow sur le lézard*/
.drop-shadow-sm { filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.15)); }
.drop-shadow { filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2)); }
.drop-shadow-lg { filter: drop-shadow(0px 8px 16px rgba(0,0,0,0.25)); }

/* =====================
   STYLE LIENS EXERCICES
   ===================== */
/* Liens exercices */
.exo-link {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
  display: inline-block;
  padding-left: 22px;        /* espace réservé pour l’icône */
  background-repeat: no-repeat;
  background-position: left center;
  line-height: 1.4;
}

/* Lien texte simple précédé par une icône Bootstrap Icons externe */
.exo-link-text {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
  display: inline;
  padding-left: 0;
  background-image: none;
  line-height: 1.4;
}

/* Petit conteneur optionnel pour icône + lien */
.internal-link {
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
}

.internal-link .icon-internal {
  margin-right: 0;
}

/* Eclipse Crossword */
.exo-crossword {
  background-image: url("../images/exo_crossword.svg");
}
/* Hot Potatoes */
.exo-jcloze {
  background-image: url("../images/exo_jcloze.svg");
}
/* Hot Potatoes */
.exo-jquiz {
  background-image: url("../images/exo_jquiz.svg");
}
/* Hot Potatoes */
.exo-jmatch {
  background-image: url("../images/exo_jmatch.svg");
}
/* Hot Potatoes */
.exo-jmatch_sort {
  background-image: url("../images/exo_jmatch_sort.svg");
}
/* Hot Potatoes */
.exo-jmix {
  background-image: url("../images/exo_jmix.svg");
}
/* Clicmot Fonction obsolète ?*/
.exo-fonction {
  background-image: url("../images/exo_fonction.svg");
}
/* Clicmot Nature  obsolète ? */
.exo-nature {
  background-image: url("../images/exo_nature.svg");
}
/* Clic*/
.exo-clic {
  background-image: url("../images/exo_clic.svg");
}
/* Mots mêlés */
.exo-motsmeles {
  background-image: url("../images/exo_motsmeles.svg");
}
/* Quiz */
.exo-quiz {
  background-image: url("../images/exo_quiz.svg");
}
/* Snakes & Ladders */
.exo-snake {
  background-image: url("../images/exo_snake.svg");
}
/* HotPotatoes global */
.exo-hot {
  background-image: url("../images/exo_hot.svg");
}
/* exercice sur la ponctuation */
.exo-ponctuation {
  background-image: url("../images/exo_ponctuation.svg");
}
/* exercice sur la dictée */
.exo-dictee {
  background-image: url("../images/exo_dictee.svg");
}
/* exercice wordsearch */
.exo-wordsearch {
  background-image: url("../images/exo_motsmeles.svg");
}
/* exercice marguerite */
.exo-marguerite {
  background-image: url("../images/exo_marguerite.svg");
}
/* exercice match */
.exo-match {
  background-image: url("../images/exo_match.svg");
}
/* exercice match */
.exo-operations {
  background-image: url("../images/exo_operations.svg");
}

/* interne / sortant / pdf / Excel / SVG / privé */
.link-bi-ico {
  text-decoration: none;
  color: inherit;
  padding-left: 3px;
  display: inline-flex; /* Pour aligner l'icône et le texte */
  align-items: center; /* Centre verticalement l'icône et le texte */
  transition: all 0.2s ease-in-out;
}

/* Effet au survol */
.link-bi-ico:hover {
  color: rgb(var(--dark));
  transform: translateX(2px); /* Décale légèrement le lien vers la droite */
}

/* Effet sur l'icône au survol */
.link-bi-ico:hover i {
  transform: scale(1.1); /* Agrandit légèrement l'icône */
}


/* ==========================================================================
   CSS DES PAGES INDEX DES RUBRIQUES EX. FRANCAIS/CONJUGAISON/FUTUR/INDEX.PHP
   ========================================================================== */
/* CLASSE DÉDIÉE AUX ONGLETS PERSONNALISÉS */
.nav-tab-custom {
  gap: 0.5rem; /* espace entre les onglets */
}

.nav-tab-custom .nav-link {
  margin: 0;
  transition: all 0.2s ease;
  border-top: 1px solid transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

/* Survol : bordure subtile avec transparence */
.nav-tab-custom .nav-link:hover {
  border-top: 1px solid rgba(0,0,0,0.15);    /* gris très léger */
  border-left: 1px solid rgba(0,0,0,0.15);
  border-right: 1px solid rgba(0,0,0,0.15);
  /* Utilisation de la nouvelle nuance --extra-light pour un survol très doux */
  background-color: rgba(var(--extra-light), 0.75); /* 75% opacité */ 
}

/* Onglet actif : accent coloré mais doux */
.nav-tab-custom .nav-link.active {
  border-top: 1px solid rgb(var(--accent));
  border-left: 1px solid rgb(var(--accent));
  border-right: 1px solid rgb(var(--accent));
  background-color: rgba(var(--accent), 0.85); /* accent adouci */
  
  color: rgb(var(--light));
  font-weight: 600;
}

/* CLASSE DÉDIÉE AUX EXEMPLES DES LEÇONS */
/* Base commune */
.example-highlight {
  line-height: 1.5;
  margin: 1rem auto;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  background-color: rgba(255, 243, 205, 0.8);
  border-left: 4px solid #ffc107;
  border-radius: 0.25rem;
  font-style: italic;
  position: relative;
  color: #212529;
  max-width: 100%; /* par défaut sur mobile */
}

@media (min-width: 768px) {
  .example-highlight {
    max-width: 720px; /* col-md-8 */
  }
}

@media (min-width: 1200px) {
  .example-highlight {
    max-width: 960px; /* col-lg-10 */
  }
}

/* Variantes avec emoji */
.example-lightbulb::before {
  content: "💡"; 
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

.example-quote::before {
  content: "💬"; 
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

.example-pin::before {
  content: "📌";
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

.example-brain::before {
  content: "🧠"; 
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

.example-check::before {
  content: "✅"; /* bonne réponse, validation */
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

.example-warning::before {
  content: "⚠️"; /* mise en garde, contre-exemple */
  position: absolute;
  left: 0.75rem;
  font-size: 1.2rem;
}

/* STYLE GLOBAL DES TABLEAUX DE CONJUGAISON */
.conj-table {
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.conj-table td {
    padding: 0.25rem;
    vertical-align: middle;
    line-height: 1.4;
}

.conj-table tr.table-inf {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conj-table td b {
    color: #0a3d62;
}

.conj-table tbody tr:nth-child(even):not(.table-inf) {
    background: #fafafa;
}

/* Bordures arrondies harmonisées dans le responsive */
.table-responsive {
    border-radius: 5px;
}

/* Permet aux classes bg-* de fonctionner sur les <tr> */
.conj-table tr[class*="bg-"] {
    --bs-table-bg: unset;
}

.conj-table tr.bg-base   { --bs-table-bg: rgb(var(--base)); }
.conj-table tr.bg-light  { --bs-table-bg: rgb(var(--light)); }
.conj-table tr.bg-dark   { --bs-table-bg: rgb(var(--dark)); }
.conj-table tr.bg-accent { --bs-table-bg: rgb(var(--accent)); }
.conj-table tr.bg-extra-light  { --bs-table-bg: rgb(var(--extra-light)); }
.conj-table tr.bg-extra-dark   { --bs-table-bg: rgb(var(--extra-dark)); }

/* Alignement sur mobile : on centre tout */
@media (max-width: 576px) {
    .conj-table td {
        text-align: center;
        padding: .75rem;
    }
}

/* CLASSES DÉDIÉES AUX EXEMPLES DES LEÇONS */
/* Bandeau titre */
.didactique-title {
    background-color: rgb(var(--base));
    padding: .75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Lien stylé non souligné */
.didactique-link {
    text-decoration: none;
    font-weight: 500;
    color: rgb(var(--dark));
    transition: color .2s ease;
}

.didactique-link:hover {
    color: rgb(var(--accent));
}

/* Icône plus visible mais sobre */
.icon-link {
    /*color: rgb(var(--dark));*/
    font-size: 1.1rem;
    margin-right: 4px;
    vertical-align: middle;
}

/* 1. On déclare TOUTES vos classes d'icônes ici pour leur donner la base commune */
.icon-external, 
.icon-internal, 
.icon-pdf, 
.icon-excel, 
.icon-svg, 
.icon-private {
    /*color: rgb(var(--dark)); */
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* 2. On applique la police Bootstrap Icons à tous les pseudo-éléments d'un coup */
.icon-external::before,
.icon-internal::before,
.icon-pdf::before,
.icon-excel::before,
.icon-svg::before,
.icon-private::before {
    display: inline-block;
    font-family: "bootstrap-icons" !important;
    margin-right: 6px;
    vertical-align: middle;
    font-style: normal;
}

/* 3. On attribue chaque symbole spécifique */
.icon-external::before { content: "\F1C5"; } /* bi-box-arrow-up-right */
.icon-internal::before { content: "\F470"; } /* bi-link-45deg */
.icon-pdf::before      { content: "\F756"; } /* bi-file-earmark-pdf */
.icon-excel::before    { content: "\F389"; } /* bi-file-earmark-excel */
.icon-svg::before      { content: "\F762"; } /* bi-filetype-svg */
.icon-private::before  { content: "\F371"; } /* bi-lock-fill */

/* Harmonisation des td pour lecture */
.didactique-table td {
    padding: .9rem .75rem;
    vertical-align: middle;
    background-color: rgb(var(--extra-light));
}

/* Ligne Snakes and Ladders plus mise en valeur */
.didactique-table td[colspan="2"] {
    background-color: rgb(var(--light));
    font-weight: 600;
}
.didactique-table {
    table-layout: fixed;
    width: 100%;
}
/*empêcher les liens de casser le layout*/
.didactique-table td a {
    display: inline-block;
    white-space: normal;
    word-break: break-word;
}


/* Réduction sur mobile */
@media (max-width: 576px) {
    .didactique-table td {
        text-align: center;
        display: block;
        width: 100%;
    }

    .didactique-table tr td + td {
        border-top: none;
    }
}

/* Page révision conjugaison */
.lesson-step{
    background:#ffffff;
    border-radius:10px;
    padding:1.5rem 1.8rem;
    margin:2.5rem 0;
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 6px 14px rgba(0,0,0,.08);
}
.lesson-section1 {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;        /* ← VRAI espace */
}

.lesson-section1 > .lesson-step {
  flex: 1 1 48%;    /* deux colonnes */
}
@media (max-width: 768px) {
  .lesson-section1 > .lesson-step {
    flex-basis: 100%;
  }
}
/* =========================================================
   LECTURE - CARTES ŒUVRES — COUVERTURES UNIFORMES
   ========================================================= */

.card-cover {
  width: 100%;
  height: 240px;          /* hauteur uniforme */
  object-fit: cover;     /* recadre sans déformer */
  object-position: center;
  background: #f5f5f5;   /* sécurité si image lente */
}

.card-cover-full {
  width: 100%;
  height: 190px;           /* ← taille raisonnable */
  object-fit: contain;    /* image entière */
  object-position: center;
  background-color: #f6f6f6;
  padding: 0.4rem;        /* évite que l’image touche les bords */
}
@media (max-width: 576px) {
  .card-cover-full {
    height: 160px;
  }
}
/* =========================================================
   GRILLE DE CARTES — RESPONSIVE SC@LPA
   ========================================================= */

.card-grid {
  display: grid;
  gap: 1.5rem;
  justify-content: center; /* centre les cartes si ligne incomplète */
}
/* =========================================================
   TITRES DE CARTES — PAS D’HYPHÉNATION
   ========================================================= */

.card-grid h3 {
  hyphens: none;                 /* ← clé du problème */
  word-break: normal;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* Smartphone : 1 carte */
@media (max-width: 575.98px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablette / écran moyen : 2 ou 3 cartes */
@media (min-width: 576px) and (max-width: 991.98px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Grand écran : 4 ou 5 cartes max */
@media (min-width: 992px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 1200px;  /* limite visuelle élégante */
    margin-inline: auto;
  }
}
/* =========================================================
   CARTES ŒUVRES — SYNOPSIS
   ========================================================= */

.card-synopsis {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  margin-top: 0.5rem;
}

/* augmente espace des <li> */
.li-spaced li {
  margin-bottom: 0.5rem; 
}

/* PASTILLE CONNEXION */
/* Base commune pour les cercles */

.moncercle {
    display: inline-flex; /* Magique pour le centrage */
    align-items: center;
    justify-content: center;
    width: 35px; 
    height: 35px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    line-height: 1; /* Évite les décalages de ligne */
    text-decoration: none !important; /* Enlève le souligné du lien */
}
.moncercle i {
    font-size: 1.5rem; /* Augmente cette valeur (ex: 1.8rem) pour qu'il soit plus gros */
    line-height: 1;
    display: block;
}
.moncercle:hover {
    transform: scale(1.1); /* Petit effet au survol */
}

.moncercleoff {
    background-color: #d94c0f;
    color: white;
}

.moncercleon {
    background-color: #bfd70e;
    color: #004085; /* Bleu foncé pour contraste sur vert/jaune */
}
.nav-link:hover .moncercleoff {
    background-color: #f36d33; /* Un orange un peu plus vif au survol */
    transform: scale(1.05);
    transition: all 0.2s;
}

/* Adaptation de la hauteur de l'iframe en mode évaluation */
#exerciseFrame {
    width: 100%;
    min-height: 600px;
    border: 0;
    display: block;
    overflow: hidden;
}