/* (c) 2026 YANOVA SAS — Tous droits réservés */
/* SECOYA : composants propres au site (préfixe sc-), au-dessus du socle famille-yanova.
   Rôles de couleur seulement ; mouvements coupés par prefers-reduced-motion. */

/* Méga-menu : une vedette et cinq familles */
.fy-mega__grille--secoya { grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); }
.fy-mega__grille--secoya .fy-mega__vedette { grid-column: auto; }
@media (max-width: 1200px) { .fy-mega__grille--secoya { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .fy-mega__grille--secoya { grid-template-columns: 1fr; } }

/* Héros : texte et captures en plans superposés */
.sc-heros { padding-block: var(--espace-16) var(--espace-24); overflow: hidden; }
.sc-heros__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--espace-12); align-items: center; }
.sc-heros__texte .fy-chapo { max-width: 560px; }
.sc-heros__visuel { position: relative; min-height: 440px; }
.sc-heros__arbre { position: absolute; right: -40px; top: -30px; width: 280px; height: 280px; opacity: .14; }
.sc-plan { position: absolute; margin: 0; }
.sc-plan--1 { left: 0; top: 20px; width: 92%; }
.sc-plan--2 { right: -2%; top: 200px; width: 84%; }
@media (max-width: 960px) {
  .sc-heros__grille { grid-template-columns: 1fr; }
  .sc-heros__visuel { min-height: 300px; }
  .sc-plan--2 { right: -4%; top: 130px; }
}
@media (max-width: 640px) { .sc-heros__visuel { min-height: 220px; } .sc-plan--2 { top: 90px; } }

/* Fenêtre d'application autour d'une capture */
.sc-fenetre { margin: 0; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); box-shadow: var(--ombre-panneau); overflow: hidden; }
.sc-fenetre__barre { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--bordure); background: var(--fond-alt); }
.sc-fenetre__barre i { width: 10px; height: 10px; border-radius: 50%; background: var(--bordure); }
.sc-fenetre img { display: block; width: 100%; height: auto; }
.sc-fenetre figcaption { padding: 8px 12px; font: 500 12px/18px var(--font-mono); color: var(--texte-discret); border-top: 1px solid var(--bordure); }

/* Plans du héros : légère parallaxe au défilement, là où le navigateur la sait faire sans script */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .sc-plan--1 { animation: sc-monte-lent linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
    .sc-plan--2 { animation: sc-monte-vite linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
    .sc-heros__arbre { animation: sc-tourne linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
  }
}
@keyframes sc-monte-lent { to { transform: translateY(-30px); } }
@keyframes sc-monte-vite { to { transform: translateY(-80px); } }
@keyframes sc-tourne { to { transform: rotate(18deg) translateY(40px); } }

/* Constat : avant, avec SECOYA */
.sc-constat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-6); }
.sc-constat > div { padding: var(--espace-8); border-radius: var(--rayon-lg); border: 1px solid var(--bordure); background: var(--surface); }
.sc-constat__apres { border-color: var(--action) !important; box-shadow: var(--ombre-carte); }
.sc-constat ul, .sc-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-4); }
.sc-constat li, .sc-liste li { display: grid; grid-template-columns: 24px 1fr; gap: var(--espace-3); align-items: start; }
.sc-constat__avant .fy-icone { color: var(--texte-discret); }
.sc-constat__apres .fy-icone, .sc-liste .fy-icone { color: var(--accent-texte); }
.sc-constat strong { color: var(--titre); }
.sc-etiquette { margin: 0 0 var(--espace-6); font: 500 13px/20px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--texte-discret); }
.sc-etiquette--accent { color: var(--accent-texte); }
@media (max-width: 960px) { .sc-constat { grid-template-columns: 1fr; } }

/* Familles de modules */
.sc-famille__nombre { font: 500 14px/20px var(--font-mono); color: var(--accent-texte); }
.sc-famille__liste { margin-top: auto; font-size: 14px; line-height: 21px; color: var(--texte-discret); }
.sc-famille--tout { background: var(--action); border-color: var(--action); color: var(--texte-sur-action); }
.sc-famille--tout .fy-h3, .sc-famille--tout .fy-carte__suite { color: var(--texte-sur-action); }
a.sc-famille--tout:hover { color: var(--texte-sur-action); background: var(--action-survol); }

/* Deux colonnes : texte et visuel */
.sc-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-16); align-items: center; }
.sc-deux .sc-liste { margin-block: var(--espace-6) var(--espace-8); }
.sc-deux--tete { align-items: end; }
@media (max-width: 960px) { .sc-deux { grid-template-columns: 1fr; gap: var(--espace-8); } }

/* Tablette (décor) */
.sc-tablette { justify-self: center; width: min(100%, 360px); aspect-ratio: 3 / 4; padding: 18px; border-radius: 28px; background: var(--bande-nuit); box-shadow: var(--ombre-panneau); }
.sc-tablette__ecran { height: 100%; border-radius: 14px; background: var(--fond-alt); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--espace-4); }
.sc-tablette__ecran img { width: 45%; height: auto; }
.sc-tablette__ecran span { font: 700 20px/1 var(--font-sans); color: var(--titre); }

/* Liste sur bande nuit */
.sc-liste--nuit li { color: var(--texte-sur-nuit); }
.sc-liste--nuit .fy-icone { color: var(--accent-sur-nuit); }

/* Logos clients : bandeau lent, arrêté au survol et en mouvement réduit */
.sc-defile { display: flex; overflow: hidden; padding-block: var(--espace-4); }
.sc-defile__liste { display: flex; flex: none; gap: var(--espace-16); margin: 0; padding: 0 var(--espace-8); list-style: none; align-items: center; }
.sc-defile__liste img { display: block; height: 56px; width: auto; max-width: 180px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.sc-defile__liste img:hover { filter: none; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .sc-defile__liste { animation: sc-defile 40s linear infinite; }
  .sc-defile:hover .sc-defile__liste { animation-play-state: paused; }
}
@keyframes sc-defile { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .sc-defile { justify-content: center; }
  .sc-defile__liste { flex-wrap: wrap; justify-content: center; row-gap: var(--espace-8); }
  .sc-defile__liste[aria-hidden="true"] { display: none; }
}

/* Lien de suite de section */
.sc-suite { margin: var(--espace-8) 0 0; }
.sc-suite a { display: inline-flex; align-items: center; gap: var(--espace-2); font-weight: 600; color: var(--action); }

/* Appel final */
.sc-appel__grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--espace-12); align-items: center; }
.sc-appel__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--espace-4); }
.sc-appel__lien { display: inline-flex; align-items: center; gap: var(--espace-2); color: var(--texte-sur-nuit); font-weight: 600; }
.sc-appel__lien .fy-icone { color: var(--accent-sur-nuit); }
@media (max-width: 960px) { .sc-appel__grille { grid-template-columns: 1fr; } }

/* Pied : téléphone et courriel */
.sc-pied-contact { display: flex; flex-direction: column; gap: var(--espace-2); }
.sc-pied-contact a { display: inline-flex; align-items: center; gap: var(--espace-2); }

/* En-tête de page intérieure */
.sc-tete-page { padding-block: var(--espace-16) var(--espace-8); }
.sc-tete-page + .fy-section:not(.fy-section--alt) { padding-top: var(--espace-8); }
.sc-tete-page .fy-surtitre a { color: inherit; }
.sc-statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-texte); }
.sc-statut { color: var(--accent-texte); border-color: currentColor; }

/* Fiche d'un module */
.sc-fiche { margin: 0; display: grid; gap: var(--espace-4); padding: var(--espace-6); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); background: var(--fond-alt); }
.sc-fiche dt { font: 500 12px/18px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--texte-discret); }
.sc-fiche dd { margin: var(--espace-1) 0 0; color: var(--titre); }

/* Module précédent et suivant */
.sc-precedent-suivant { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-6); margin-top: var(--espace-12); }
.sc-precedent-suivant a { display: flex; flex-direction: column; gap: var(--espace-1); padding: var(--espace-6); border: 1px solid var(--bordure); border-radius: var(--rayon-md); background: var(--surface); color: var(--titre); font-weight: 700; text-decoration: none; }
.sc-precedent-suivant a:last-child { text-align: right; }
.sc-precedent-suivant span { font: 500 12px/18px var(--font-mono); color: var(--texte-discret); }
@media (max-width: 640px) { .sc-precedent-suivant { grid-template-columns: 1fr; } .sc-precedent-suivant a:last-child { text-align: left; } }

/* Offres */
.sc-offres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-6); margin-bottom: var(--espace-8); }
.sc-offre .fy-bouton { margin-top: auto; align-self: flex-start; }
.sc-offre--avant { border: 2px solid var(--action); }
.sc-offre__specs { margin: var(--espace-4) 0 var(--espace-6); display: grid; gap: var(--espace-2); }
.sc-offre__specs div { display: grid; gap: 2px; padding-top: var(--espace-2); border-top: 1px solid var(--bordure); }
.sc-offre__specs dt { font-size: 13px; line-height: 18px; color: var(--texte-discret); }
.sc-offre__specs dd { margin: 0; font-weight: 600; color: var(--titre); }
.sc-offre__prix { font: 700 28px/36px var(--font-sans); color: var(--titre); }
@media (max-width: 960px) { .sc-offres { grid-template-columns: 1fr; max-width: 520px; } }
@media (max-width: 640px) { .sc-offres { grid-template-columns: 1fr; } }

/* Étapes numérotées (page module, accompagnement) */
.sc-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--espace-6); counter-reset: sc-etape; }
.sc-etapes li { counter-increment: sc-etape; padding: var(--espace-6); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); background: var(--surface); }
.sc-etapes li::before { content: counter(sc-etape, decimal-leading-zero); display: block; margin-bottom: var(--espace-3); font: 500 14px/20px var(--font-mono); color: var(--accent-texte); }
.sc-etapes strong { display: block; margin-bottom: var(--espace-2); color: var(--titre); font-size: 18px; line-height: 26px; }
.sc-etapes p { margin: 0; }

/* Références réglementaires */
.sc-references { margin-top: var(--espace-4); font-size: 14px; line-height: 21px; color: var(--texte-discret); }

/* Contact : formulaire et coordonnées */
.sc-contact { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--espace-12); align-items: start; }
.sc-formulaire { padding: var(--espace-8); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); background: var(--surface); box-shadow: var(--ombre-carte); }
.sc-formulaire__duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--espace-4); }
.sc-formulaire fieldset { border: 0; margin: 0 0 var(--espace-4); padding: 0; }
.sc-formulaire legend { font-weight: 600; color: var(--titre); font-size: 15px; margin-bottom: var(--espace-2); }
.sc-choix { display: flex; gap: var(--espace-2); align-items: flex-start; margin-bottom: var(--espace-2); font-size: 15px; }
.sc-choix input { margin-top: 4px; }
.sc-obligatoire { color: var(--texte-discret); font-weight: 400; }
.sc-coordonnees { display: grid; gap: var(--espace-6); }
.sc-coordonnees .fy-carte a { display: inline-flex; align-items: center; gap: var(--espace-2); font-weight: 600; }
@media (max-width: 960px) { .sc-contact { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .sc-formulaire { padding: var(--espace-6); } .sc-formulaire__duo { grid-template-columns: 1fr; } }

/* ---------- Chat Zammad (bouton au clic, js/chat-zammad.js) ---------- */
.sc-chat { position: fixed; right: var(--espace-6); bottom: var(--espace-6); z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: var(--espace-2); max-width: min(320px, calc(100vw - 2 * var(--espace-6))); }
.sc-chat[hidden] { display: none; }
.sc-chat__bouton { display: inline-flex; align-items: center; gap: var(--espace-2); padding: 12px 18px; font: 600 15px/20px var(--font-sans); color: var(--texte-sur-action); background: var(--action); border: 0; border-radius: 999px; box-shadow: var(--ombre-carte); cursor: pointer; }
.sc-chat__bouton:hover { background: var(--action-survol); }
.sc-chat__bouton:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
.sc-chat__bouton[aria-busy="true"] { opacity: .7; cursor: progress; }
.sc-chat__bouton .fy-icone { width: 20px; height: 20px; }
.sc-chat__message { margin: 0; padding: var(--espace-3) var(--espace-4); font-size: 14px; line-height: 20px; color: var(--texte); background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-md); box-shadow: var(--ombre-carte); }
@media (max-width: 640px) { .sc-chat { right: var(--espace-4); bottom: var(--espace-4); } .sc-chat__bouton span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .sc-chat__bouton { padding: 14px; } }
/* Taille du texte du widget Zammad : ici plutôt que par l'option fontSize, qui écrit un style en ligne (bloqué par la CSP). */
.zammad-chat { font-size: 12px; }
@media print { .sc-chat { display: none; } }
/* Secoya-Tab-Full : bandeau de la saisie hors ligne (accueil, page Secoya-Tab), mis en avant à la demande de la direction. */
.sc-full__tete { max-width: 760px; margin-bottom: var(--espace-12); }
.sc-full__surtitre { display: inline-flex; align-items: center; gap: var(--espace-2); }
.sc-full__surtitre .fy-icone { width: 20px; height: 20px; }
.sc-full .fy-chapo { color: var(--texte-sur-nuit); }
.fy-section--nuit a.sc-full__carte { color: var(--texte-sur-nuit); background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .16); box-shadow: none; }
.fy-section--nuit a.sc-full__carte:hover { background: rgb(255 255 255 / .11); text-decoration: none; }
.sc-full__carte .fy-h3 { margin: 0; }
.sc-full__carte p { margin: 0; }
.sc-full__icone { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--rayon-md); background: var(--accent-sur-nuit); color: var(--bande-nuit); }
.sc-full__icone .fy-icone { width: 24px; height: 24px; }
.sc-full__carte .fy-carte__suite { margin-top: auto; color: var(--accent-sur-nuit); }
.sc-full__suite { margin: var(--espace-12) 0 0; }
