/* Ambiances immersives du site Mawydo.
   Responsabilité : varier les compositions par page, gradients et effets progressifs,
   tout en conservant la palette commune et un rendu lisible sans JavaScript. */
body {
  background: radial-gradient(ellipse at 0 30%, #d8efe080, transparent 45%), #f5f8f5;
}
.entete-site { background: #f5f8f5e8; }
.hero {
  position: relative;
  isolation: isolate;
  margin-top: 24px;
  margin-bottom: 28px;
  padding: 70px 40px;
  border-radius: 32px;
  background: radial-gradient(ellipse at 90% 10%, #a6e6ce70, transparent 60%),
    radial-gradient(ellipse at 5% 100%, #e6edb950, transparent 60%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(#39796524 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(110deg, transparent 20%, #000 90%);
}
.hero h1 {
  background: linear-gradient(125deg, #082b39 15%, #17675b 78%, #269780);
  background-clip: text;
  color: transparent;
  font-size: clamp(2.6rem, 4.5vw, 4.7rem);
}
.hero-visuel {
  position: relative;
  background: linear-gradient(145deg, #ffffffcc, #c7e8d9b3);
  border: 1px solid #ffffff;
  padding: 22px;
  transform: rotate(2deg);
  box-shadow: 0 35px 70px -30px #0c493951, inset 0 1px 0 #ffffff;
  transition: transform .6s ease, box-shadow .6s ease;
}
.hero-visuel:hover { transform: rotate(0deg) translateY(-4px); }
.hero-visuel img { background: transparent; border-radius: 18px; }
.visuel-etapes { box-shadow: 0 5px 20px #0b493008; }
.etiquette { display: flex; align-items: center; gap: 10px; }
.etiquette::before {
  content: '';
  width: 20px;
  height: 2px;
  flex-shrink: 0;
  background: currentColor;
}
.bouton:not(.bouton-secondaire) {
  background: linear-gradient(120deg, #092c3a, #17675b);
  box-shadow: 0 8px 24px -12px #17675b99;
}
.bouton:not(.bouton-secondaire):hover { box-shadow: 0 12px 28px -10px #17675b99; }
.carte-lien {
  background: linear-gradient(150deg, #ffffff, #f0f7f2);
  box-shadow: 0 8px 30px -25px #17675b77;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.carte-lien:hover { transform: translateY(-6px); box-shadow: 0 22px 45px -25px #17675b66; }
.carte-lien img { transition: transform .6s; }
.carte-lien:hover img { transform: scale(1.025); }
.section-cta {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 100% 10%, #5ebcac99, transparent 60%),
    linear-gradient(120deg, #d8efdf, #e5efbd);
}
.section-cta::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid #17675b22;
  border-radius: 50%;
  right: -110px;
  bottom: -140px;
  box-shadow: 0 0 0 65px #17675b08, 0 0 0 130px #17675b06;
  pointer-events: none;
}
.section-cta .conteneur { position: relative; z-index: 1; }
.pied-site { background: linear-gradient(145deg, #092c3a, #042b29); }
/* Accueil : une scène lumineuse, ample, puis des modules de tailles différentes. */
.page-index .hero { padding-top: 90px; padding-bottom: 90px; }
.page-index .hero-visuel { border-radius: 90px 24px 24px 24px; padding-top: 38px; }
.page-index .hero .visuel-entete { padding-left: 28px; }
.page-index .grille-cartes .carte-lien:first-child { grid-column: span 2; }
.page-index .grille-cartes .carte-lien:first-child h3 { font-size: 2rem; max-width: 500px; }
/* Sur mesure : composition inversée, plus douce et asymétrique. */
.page-logiciels-sur-mesure .hero {
  background: radial-gradient(ellipse at 10% 20%, #bce7ce, transparent 70%), #edf2e6;
}
.page-logiciels-sur-mesure .hero-texte { order: 2; }
.page-logiciels-sur-mesure .hero-visuel { order: 1; transform: rotate(-3deg); }
.page-logiciels-sur-mesure .hero-visuel:hover { transform: rotate(0deg); }
.page-logiciels-sur-mesure .hero-visuel { border-radius: 24px 90px 24px 24px; }
/* Gestion et IA : contrastes profonds ; le contenu de lecture reste clair. */
.page-gestion-entreprise .hero,
.page-intelligence-artificielle .hero {
  background: radial-gradient(ellipse at 90% 0, #247a7177, transparent 60%),
    linear-gradient(135deg, #092c3a, #062a28);
  color: #f1fff8;
}
.page-intelligence-artificielle .hero {
  background: radial-gradient(ellipse at 85% 60%, #4b6caa66, transparent 55%),
    radial-gradient(ellipse at 20% 0, #2f918c44, transparent 60%), #0b253d;
}
.page-gestion-entreprise .hero h1,
.page-intelligence-artificielle .hero h1,
.page-suivi-terrain .hero h1 {
  background-image: linear-gradient(120deg, #fff 25%, #a8e8ce 90%);
}
.page-gestion-entreprise .hero .introduction,
.page-intelligence-artificielle .hero .introduction,
.page-suivi-terrain .hero .introduction { color: #d5e6e1; }
.page-gestion-entreprise .hero .etiquette,
.page-intelligence-artificielle .hero .etiquette,
.page-suivi-terrain .hero .etiquette { color: #b8eabc; }
.page-gestion-entreprise .hero .fil-ariane,
.page-intelligence-artificielle .hero .fil-ariane,
.page-suivi-terrain .hero .fil-ariane,
.page-gestion-entreprise .hero .repere,
.page-intelligence-artificielle .hero .repere,
.page-suivi-terrain .hero .repere { color: #c0d8d0; }
.page-gestion-entreprise .hero .bouton-secondaire,
.page-intelligence-artificielle .hero .bouton-secondaire,
.page-suivi-terrain .hero .bouton-secondaire { color: white; border-color: #ffffff50; }
.page-gestion-entreprise .hero .bouton-secondaire:hover,
.page-intelligence-artificielle .hero .bouton-secondaire:hover,
.page-suivi-terrain .hero .bouton-secondaire:hover { background: #ffffff15; }
.page-gestion-entreprise .hero-visuel,
.page-intelligence-artificielle .hero-visuel {
  color: #deeee7;
  background: linear-gradient(145deg, #ffffff18, #8bdbc411);
  border-color: #ffffff30;
  box-shadow: 0 25px 70px #00000040;
}
.page-gestion-entreprise .visuel-etapes,
.page-intelligence-artificielle .visuel-etapes { background: #ffffff0e; }
.page-gestion-entreprise .legende,
.page-intelligence-artificielle .legende { color: #bfd7d3; }
.page-gestion-entreprise .hero-visuel img,
.page-intelligence-artificielle .hero-visuel img { background: #e9f2ef; }
/* Terrain : une grande photo en contexte, avec un panneau de texte contrasté. */
.page-suivi-terrain .hero {
  background: linear-gradient(90deg, #072c32f7 15%, #092c32cc 60%, #072c3270),
    url('../public/images/equipe-connectee-mawydo.png') center / cover;
  color: white;
  min-height: 650px;
}
.page-suivi-terrain .hero-visuel { background: #f5fff3e0; transform: rotate(3deg); }
.page-suivi-terrain .hero-visuel > img { display: none; }
.page-suivi-terrain .hero-visuel { padding: 35px 25px; color: #092c3a; }
.page-suivi-terrain .visuel-etapes { flex-direction: column; gap: 22px; margin: 28px 0; }
.page-suivi-terrain .visuel-etapes b { transform: rotate(90deg); }
.page-suivi-terrain .grille-hero { grid-template-columns: 1.5fr .6fr; }
/* Automatisation : un flux visuel et des étapes connectées. */
.page-automatisation .hero {
  background: radial-gradient(ellipse at 80% 20%, #9ad8c477, transparent 60%),
    linear-gradient(130deg, #edf1dd, #e4f4ef);
}
.page-automatisation .hero-visuel { border-radius: 140px 140px 24px 24px; padding-top: 42px; }
.page-automatisation .visuel-entete { justify-content: center; }
.page-automatisation .visuel-plus { display: none; }
.page-automatisation .contenu-services,
.page-methode .contenu-services { position: relative; padding-left: 80px; }
.page-automatisation .bloc-editorial,
.page-methode .bloc-editorial { position: relative; border: 0; border-bottom: 1px solid #d8e1dc; }
.page-automatisation .bloc-editorial::before,
.page-methode .bloc-editorial::before {
  content: attr(data-etape);
  position: absolute;
  left: -80px;
  top: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1e8d8, #eff3d6);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #17675b;
}
/* Solutions : un panorama centré et une collection de projets illustrés. */
.page-solutions .grille-hero { display: flex; flex-direction: column; gap: 36px; }
.page-solutions .hero-texte { text-align: center; max-width: 900px; }
.page-solutions .hero h1 { font-size: clamp(3rem, 5.5vw, 5.6rem); }
.page-solutions .hero .introduction { margin-left: auto; margin-right: auto; max-width: 720px; }
.page-solutions .hero .etiquette,
.page-solutions .hero .actions { justify-content: center; }
.page-solutions .hero-visuel { width: 100%; max-width: 900px; transform: none; padding: 12px; }
.page-solutions .hero-visuel img { height: 280px; margin: 0; object-fit: cover; }
.page-solutions .visuel-entete,
.page-solutions .visuel-etapes,
.page-solutions .legende { display: none; }
.page-solutions .contenu-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.page-solutions .bloc-editorial {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #d8e1dc;
  border-radius: 24px;
  padding: 20px;
  background: white;
}
.page-solutions .bloc-editorial h2 { font-size: 1.7rem; margin-top: 28px; }
.page-solutions .bloc-editorial p { font-size: .95rem; }
.illustration-solution { height: 190px; width: 100%; object-fit: cover; border-radius: 16px; }
/* Méthode, blog et contact ont chacun un rythme de lecture distinct. */
.page-methode .hero { background: linear-gradient(135deg, #ecf0d9, #cbe8dc); }
.page-methode .hero-visuel { border-radius: 50%; aspect-ratio: 1; padding: 35px; }
.page-methode .hero-visuel .visuel-etapes,
.page-methode .hero-visuel .legende { display: none; }
.page-blog .grille-hero { grid-template-columns: 1.5fr .7fr; }
.page-blog .hero-visuel { transform: rotate(-5deg); }
.page-blog .visuel-entete,
.page-blog .visuel-etapes { display: none; }
.page-blog .hero h1 { font-size: clamp(3rem, 5.5vw, 5.6rem); }
.page-blog .grille-cartes { grid-template-columns: 1.25fr 1fr; }
.page-blog .carte-lien:first-child { grid-row: span 2; }
.page-blog .carte-lien:first-child img { height: 330px; }
.page-blog .carte-lien:first-child h3 { font-size: 2rem; }
.page-blog .carte-lien:not(:first-child) img { height: 140px; }
.page-article .hero { background: linear-gradient(120deg, #e5eee3, #f5f8f5); }
.page-article .grille-hero { display: block; max-width: 950px; }
.page-article .hero-visuel { display: none; }
.page-article .hero h1 { font-size: clamp(2.6rem, 4.7vw, 4.7rem); }
.page-article .hero .introduction { max-width: 760px; }
.page-article .hero .actions, .page-article .hero .repere { display: none; }
.page-contact .grille-hero { grid-template-columns: 1.3fr .7fr; }
.page-contact .hero-visuel { border-radius: 50% 50% 24px 24px; }
.page-contact .hero-visuel .visuel-etapes { display: none; }
.page-contact .contenu-services { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.page-contact .bloc-editorial { display: block; border: 0; padding: 32px; background: white; border-radius: 24px; }
.page-contact .bloc-editorial:last-child { background: linear-gradient(135deg, #d1e8d8, #e7efd0); }
.page-contact .bloc-editorial h2 { font-size: 1.8rem; }
/* L'animation est activée après détection JS ; rien n'est masqué sans ce module. */
.apparition-attente { opacity: .3; transform: translateY(20px); }
.apparition-visible { opacity: 1; transform: none; }
.bloc-editorial, .faq, .section > h2 {
  transition: opacity .7s ease, transform .7s ease;
}
@media (max-width: 1000px) {
  .hero { padding: 50px 28px; }
  .page-solutions .contenu-services { grid-template-columns: 1fr; }
  .page-solutions .bloc-editorial { padding: 28px; }
  .illustration-solution { height: 260px; }
}
@media (max-width: 700px) {
  .hero { padding: 36px 20px; margin-top: 14px; border-radius: 24px; }
  .hero h1 { font-size: 2.65rem; }
  .page-index .hero { padding-top: 40px; padding-bottom: 40px; }
  .grille-hero,
  .page-suivi-terrain .grille-hero,
  .page-blog .grille-hero,
  .page-contact .grille-hero { grid-template-columns: 1fr; }
  .page-index .grille-cartes .carte-lien:first-child { grid-column: auto; }
  .page-logiciels-sur-mesure .hero-texte { order: 0; }
  .hero-visuel, .page-logiciels-sur-mesure .hero-visuel,
  .page-blog .hero-visuel { transform: none; }
  .page-suivi-terrain .hero-visuel { transform: none; }
  .page-methode .hero-visuel { aspect-ratio: auto; border-radius: 28px; padding: 24px; }
  .page-solutions .hero h1, .page-blog .hero h1 { font-size: 2.8rem; }
  .page-solutions .hero-visuel img { height: 210px; }
  .page-blog .grille-cartes, .page-contact .contenu-services { grid-template-columns: 1fr; }
  .page-blog .carte-lien:first-child { grid-row: auto; }
  .page-blog .carte-lien:first-child img { height: 210px; }
  .page-automatisation .contenu-services, .page-methode .contenu-services { padding-left: 58px; }
  .page-automatisation .bloc-editorial::before,
  .page-methode .bloc-editorial::before { left: -58px; width: 40px; height: 40px; top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .apparition-attente { opacity: 1; transform: none; }
  .hero-visuel:hover, .carte-lien:hover, .carte-lien:hover img { transform: none; }
}
/* Les grandes photographies éditoriales remplissent leur cadre sans déformer le ratio. */
.page-blog .hero-visuel img { object-fit: cover; height: 340px; }
.hero h1 { overflow-wrap: break-word; }
@media (max-width: 380px) {
  .barre-navigation { gap: 8px; }
  .marque { font-size: 1.2rem; gap: 8px; }
  .symbole-marque { width: 54px; height: 24px; }
  .symbole-marque img { width: 123px; }
  .menu-site summary { padding: 8px; }
}
/* L'accueil retrouve la scène de convergence de la V1, avec une ambiance profonde. */
.page-index .hero {
  background: radial-gradient(ellipse at 90% 10%, #24888166, transparent 55%),
    radial-gradient(ellipse at 0 80%, #1d527570, transparent 60%), #0a2939;
  color: #effff8;
  overflow: hidden;
}
.page-index .hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  right: -200px;
  top: 10%;
  border-radius: 50%;
  background: #69dbc925;
  filter: blur(35px);
  animation: respiration-halo 16s ease-in-out infinite alternate;
  pointer-events: none;
}
.page-index .hero h1 { background-image: linear-gradient(125deg, #fff 20%, #a8e5ca 90%); }
.page-index .hero .introduction { color: #c6dce2; }
.page-index .hero .etiquette, .page-index .hero .repere { color: #a3dfcf; }
.page-index .hero .bouton-secondaire { color: white; border-color: #ffffff40; }
.page-index .hero .bouton-secondaire:hover { background: #ffffff15; }
.page-index .hero-visuel {
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff20, #b9e9df09);
  border: 1px solid #d3fff530;
  box-shadow: 0 25px 65px #00000030, inset 0 1px #ffffff15;
  padding: 24px;
  color: #d3e9ed;
  transform: none;
}
.entete-scene { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.entete-scene > span:last-child {
  border: 1px solid #7ee8c440;
  border-radius: 30px;
  padding: 5px 12px;
  font-size: .65rem;
  letter-spacing: .12em;
  color: #91e3cc;
}
.page-index .entete-scene .symbole-marque { width: 115px; height: 40px; }
.page-index .entete-scene .symbole-marque img {
  width: 262px;
  height: auto;
  max-width: none;
  margin: 0;
  border-radius: 0;
  background: transparent;
}
.scene-flux { width: 100%; height: 380px; margin: 16px 0 0; }
#canvas-flux-hero { width: 100%; height: 100%; display: block; }
.description-flux { margin: 0; font-size: .72rem; line-height: 1.6; color: #bdd8de; }
.pause-flux {
  padding: 7px 12px;
  margin-top: 14px;
  color: #d5ece8;
  background: #ffffff08;
  border: 1px solid #ffffff30;
  border-radius: 20px;
  font: inherit;
  font-size: .68rem;
  cursor: pointer;
}
.page-index .hero.animation-en-pause::after { animation-play-state: paused; }
.pause-flux[aria-pressed="true"] { background: #bce8d4; color: #0a2939; }
/* Une lumière suit le pointeur ; les cartes restent sans effet sur écran tactile. */
.hero-visuel, .carte-lien { position: relative; }
.hero-visuel::after, .carte-lien::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--lumiere-x, 50%) var(--lumiere-y, 50%),
    #a3f2d925, transparent 75%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
@media (hover: hover) and (pointer: fine) {
  .hero-visuel:hover::after, .carte-lien:hover::after { opacity: 1; }
}
.carte-lien { transition: opacity .7s, transform .5s, box-shadow .3s, border-color .3s; }
@keyframes respiration-halo {
  from { transform: translateY(-20px) scale(.95); opacity: .5; }
  to { transform: translateY(40px) scale(1.1); opacity: 1; }
}
@media (max-width: 700px) {
  .page-index .hero-visuel { padding: 16px; }
  .scene-flux { height: 300px; }
  .entete-scene > span:last-child { font-size: .52rem; padding: 5px 8px; }
  .page-index .entete-scene .symbole-marque { width: 86px; height: 32px; }
  .page-index .entete-scene .symbole-marque img { width: 196px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-index .hero::after { animation: none; }
  .hero-visuel::after, .carte-lien::after { display: none; }
}
