/* ============================================================
   OXALIS — user.css
   Child template de Cassiopeia
   /media/templates/site/cassiopeia_oxalis/css/user.css
   ============================================================ */

/* Les composants CSS sont déclarés dans joomla.asset.json et chargés
   en parallèle via le WebAsset Manager (voir index.php).
   Ce fichier contient uniquement les règles globales du template. */


/* 4. Utilitaires (toujours prioritaires sur tout) */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
  }

}

/* Bridge FA7 Jelly — applique la font sans le kit FA7 complet */
.fa-jelly, .fajr {
    font-family: "Font Awesome 7 Jelly";
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    font-style: normal;
    line-height: 1;
}
  
  @keyframes fadeInUp {
    from {
      opacity: 0;

    }
    to {
      opacity: 1;

    }
  }




.com-content-article__body a:not(.cta) {
  text-decoration: underline;
}

/* Icône lien externe : corps d'article uniquement, liens texte uniquement (pas d'image) */
.com-content-article__body a[href^="http"][target="_blank"]:not(:has(img))::after {
  font-family: "Font Awesome 7 Jelly";
  font-weight: 400;
  font-style: normal;
  display: inline-block;
  content: "\f08e"; /* fa-arrow-up-right-from-square */
  margin-inline-start: 0.25em;
  font-size: 0.75em;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-optical-sizing: auto;        
  font-variation-settings: "wdth" 100; 
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-size); 
  line-height: var(--text-body-lh); 
  font-weight: var(--text-body-weight);
  color:var(--color-contrast) ;
  font-optical-sizing: auto;   
}

h1 {
  font-size: var(--text-h1-size);
  color: var(--_palette-fg, var(--color-contrast));
}

h2{
  font-weight:var(--text-h2-weight) ;
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-lh);
  color: var(--_palette-fg, var(--color-primary));
  margin-block: var(--space-xl) 1em;
}

.com-content-article__body h2:has(+ h2) {
  margin-block-end: 0;
}

.com-content-article__body h2 + h2 {
  margin-block-start: 0;
}

h2:has(+ p:not(:empty)) {
  margin-block-end: 
}

h3{
  font-weight:var(--text-h3-weight) ;
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-lh);
  color: var(--_palette-fg, var(--color-secondary));
  margin-block: 1em var(--space-sm);
}

a {
  text-decoration: none;
}

.item-content, .card {
  background-color: var(--color-cards);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  --card-border-width : 0 ;
}


/* ── Palette de couleurs ─────────────────────────────────────────────────────
   Chaque classe déclare uniquement --_palette-bg et --_palette-fg.
   Pour ajouter une couleur : 1 ligne ici, tout le reste est automatique.
   ─────────────────────────────────────────────────────────────────────────── */
.primary,   .couleur-principale  { --_palette-bg: var(--color-primary);   --_palette-fg: var(--color-white);    }
.secondary, .couleur-secondaire  { --_palette-bg: var(--color-secondary); --_palette-fg: var(--color-white);    }
.contrast,  .couleur-contraste   { --_palette-bg: var(--color-contrast);  --_palette-fg: var(--color-white);    }
.accent1                         { --_palette-bg: var(--color-accent-1);  --_palette-fg: var(--color-white);    }
.beige                           { --_palette-bg: var(--color-cards);     --_palette-fg: var(--color-contrast); }

/* Application sur les éléments non-interactifs (blocs, sections, cartes…) */
:is(.primary, .couleur-principale,
    .secondary, .couleur-secondaire,
    .contrast, .couleur-contraste,
    .accent1, .beige):not(.cta) {
  background-color: var(--_palette-bg);
  color: var(--_palette-fg);
}


/* ── Accentuation de texte ───────────────────────────────────────────────────
   Usage : <span class="accentuation"> dans un titre.
   Couleur d'accent typographique — pas de fond, uniquement la couleur du texte.
   ─────────────────────────────────────────────────────────────────────────── */
.accentuation { color: var(--color-accent-4); }


/* ── Bouton CTA ──────────────────────────────────────────────────────────────
   Par défaut : accent-1 orange, texte blanc.
   Surcharge : ajouter .primary / .secondary / .accent1 directement sur le .cta
   (spécificité 0,2,0 prime sur le reset 0,1,0 ci-dessous).
   ─────────────────────────────────────────────────────────────────────────── */
.cta {
  /* Coupe l'héritage des variables palette du conteneur parent */
  --_palette-bg: initial;
  --_palette-fg: initial;
  --_cta-bg: var(--_palette-bg, var(--color-accent-1));
  background-color: var(--_cta-bg);
  color: var(--_palette-fg, var(--color-white))!important;
  border-radius: var(--radius-sm);
  display: inline-flex;
  padding: var(--space-xs) var(--space-sm);
  margin: var(--space-md) 0 var(--space-lg);

  font-family: var(--font-heading);
  font-size: var(--text-cta-size);
  font-weight: var(--text-h1-weight);
  text-decoration: none;

  transition: background-color 0.2s ease-in;

  &:hover, &:focus-visible {
    background-color: color-mix(in oklch, var(--_cta-bg) 90%, black);
    text-decoration: none;
  }
}

/* Restauration palette si couleur explicite sur le CTA lui-même (spécificité 0,2,0) */
.cta.primary,   .cta.couleur-principale  { --_palette-bg: var(--color-primary);   --_palette-fg: var(--color-white); }
.cta.secondary, .cta.couleur-secondaire  { --_palette-bg: var(--color-secondary); --_palette-fg: var(--color-white); }
.cta.contrast,  .cta.couleur-contraste   { --_palette-bg: var(--color-contrast);  --_palette-fg: var(--color-white); }
.cta.accent1                             { --_palette-bg: var(--color-accent-1);  --_palette-fg: var(--color-white); }

.cta:has(br) {
  display: inline-block;
}

.cta:has(br)::first-line {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--text-body-weight);
}

/* H2 bicolore : 1re ligne = titre (h1-size / primary), 2e ligne = sous-titre (28px / secondary) */
h2:has(br) {
  font-size: 1.75rem;                 /* 28px — pas de token exact */
  font-weight: var(--text-h2-weight); /* 800 */
  line-height: 1.1em;                  
  color: var(--color-secondary);
  padding-block-start: var(--space-xl);
}

h2:has(br)::first-line {
  font-size: var(--text-h1-size);     /* clamp(46px → 54px) */
  font-weight: var(--text-h1-weight); /* 800 */
  line-height: var(--text-h1-lh);     /* 1 */
  color: var(--color-primary);
}

.centered{
  text-align: center;
  p {
    max-width: var(--pad-paragraph-xl);
    margin-inline: auto;
  }
}

ul {
  padding-inline-start: var(--space-sm);
}

li {
  margin-block-end: var(--space-xs);
}

.com-content-article__body .form-control, .com-content-article__body .form-select {
  border: 2px solid var(--color-primary);
}

.site-grid {
    grid-gap: 0 1em;
   /* grid-template-columns: [full-start] minmax(0, 1fr)[main-start] repeat(4, minmax(0, 22rem))[main-end] minmax(0, 1fr)[full-end]; */
}    

.container-component{
  container-type : inline-size ;

}

input,
button{
  border-radius: var(--radius-md);
}

.noiretblanc, .noir-et-blanc { /*on garde noiretblanc pour la retrocomptaiblité*/
  filter: saturate(0);
}

/* Seulement les cartes hors-écran au chargement sont masquées (JS ajoute will-animate)
   → les cartes visibles dès le chargement restent à opacity:1 pour ne pas pénaliser le LCP */
.card.will-animate {
  opacity: 0;
}

.card.will-animate.is-visible {
  animation: fadeInUp 0.75s ease forwards;
  animation-delay: var(--card-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .card.will-animate { opacity: 1; }
  .card.will-animate.is-visible { animation: none; }
}



/*.wf-column:has(img)::before{
  content: '';
  display: block;
  background: url('../images/forme-triple.svg') no-repeat center / contain;
  position: absolute;
  left : var(--space-xs) ;
  top : var(--space-xs) ;
  width: 276px;
  height: 276px;
}*/

/* component/header */
.container-header{
  background: none;
  /*display: flex;*/
  /*height: 130px; */
  font-family: var(--font-heading);
  font-size: var(--text-nav-size);  
}




.breadcrumb{
  background-color: unset;
  font-size: var(--text-small-size);
  font-family: var(--font-heading);
}

/* ── Bouton flottant bas-droite ───────────────────────────────────────────── */
#mod-custom135 {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 1000;
}

#mod-custom135 p {
  margin: 0;
}

#mod-custom135 .cta {
  margin: 0;
  box-shadow: var(--shadow);
}
