/* ==========================================================================
   Conextivity : blocs fournis par la cliente (oct. 2026), adaptes au theme
   - .cx-chain   : chaine de connectivite animee + etapes Elementor (accueil, #chain)
   - .cx-story   : barre des generations + frise des jalons (hero About us)
   - .cx-archive : carrousel Elementor des photos d'archives (About us, origines)
   Le JS est dans assets/js/cx-blocks.js. Les textes sont dans les widgets
   HTML Elementor. Couleurs alignees sur le kit (fond continu #003057, bleu ciel
   #8CC4E8) ; cyan #00ADEF du flyer Brand Architecture pour la chaine.
   Les selecteurs sont prefixes par le bloc pour passer devant le reset des
   boutons (custom-reset.css).
   ========================================================================== */

/* Reinitialisation des boutons des blocs */
.cx-story button,
.cx-archive button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  border-radius: 0;
  white-space: normal;
  transition: none;
}
.cx-story button:hover,
.cx-story button:focus,
.cx-archive button:hover,
.cx-archive button:focus {
  background-color: transparent;
  color: inherit;
}

.cx-chain .cx-sr,
.cx-archive .cx-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   1. Chaine de connectivite (accueil)
   Disposition du flyer Brand Architecture (nov. 2026) : bande, 4 noeuds,
   3 etapes. Conteneur Elementor .cx-chain = widget HTML .cx-viz (animation)
   + conteneur .cx-steps (3 x .cx-step : titre + texte, editables).
   Pas de bande de couleur : la chaine repose directement sur le fond du site
   (retour cliente nov. 2026), les noeuds gardent le bleu du fond.
   ========================================================================== */

.cx-chain {
  --cx-bg: #003057;
  --cx-band: transparent;
  --cx-ring-hot: #0C3D6B;
  --cx-accent: #8CC4E8;
  --cx-text: rgba(255, 255, 255, 0.7);
  --cx-line: #4F7397;
  --cx-cyan: #00ADEF;
  --cx-white: #FFFFFF;
  --cx-k: 1;
  color: var(--cx-white);
}
.cx-chain * { box-sizing: border-box; }
.cx-chain .cx-viz { position: relative; cursor: pointer; }
.cx-chain .cx-svg { display: block; width: 100%; overflow: visible; }

.cx-chain .cx-band { fill: var(--cx-band); }
.cx-chain .cx-ring { fill: var(--cx-bg); stroke: var(--cx-white); transition: stroke .3s, fill .3s; }
.cx-chain .cx-node.is-hot .cx-ring { stroke: var(--cx-cyan); fill: var(--cx-ring-hot); }
.cx-chain .cx-ping { fill: none; stroke: var(--cx-cyan); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.cx-chain .cx-icon { fill: none; stroke: var(--cx-white); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.cx-chain .cx-icon .cx-cpu-core { fill: rgba(0, 173, 239, 0); }
.cx-chain .cx-icon .cx-gear { transform-box: fill-box; transform-origin: center; }
.cx-chain .cx-bits { fill: var(--cx-white); stroke: none; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; }
.cx-chain .cx-link { stroke: var(--cx-cyan); fill: none; }
.cx-chain .cx-sq { fill: var(--cx-cyan); transform-box: fill-box; transform-origin: center; transition: fill .15s, transform .15s; }
.cx-chain .cx-sq.is-lit { fill: var(--cx-white); transform: scale(1.45); }
.cx-chain .cx-drop { stroke: var(--cx-line); stroke-width: 1.5; fill: none; transition: stroke .3s; }
.cx-chain .cx-dot { fill: var(--cx-line); transform-box: fill-box; transform-origin: center; transition: fill .3s, transform .3s; }
.cx-chain .cx-drop.is-hot { stroke: var(--cx-cyan); }
.cx-chain .cx-dot.is-hot { fill: var(--cx-cyan); transform: scale(1.5); }
.cx-chain .cx-comet,
.cx-chain .cx-pulse { pointer-events: none; }

/* libelles sous les points (ecran etroit seulement, cree par le JS) */
.cx-chain .cx-labels { position: relative; }
.cx-chain .cx-label {
  position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; cursor: default; text-align: center; line-height: 1.4;
  font-size: max(10px, calc(15px * var(--cx-k))); font-weight: 700; text-transform: uppercase;
  letter-spacing: max(.1em, calc(.2em * var(--cx-k))); color: var(--cx-accent); transition: color .3s;
}
.cx-chain .cx-label.is-hot { color: var(--cx-white); }

/* etapes : grille dont les centres tombent sous les points (NODE_X dans cx-blocks.js) */
.cx-chain .cx-steps.e-con {
  display: grid !important;
  grid-template-columns: 31.4fr 37.2fr 31.4fr;
  gap: 0; margin: 2px 0 0; padding: 0;
}
.cx-chain .cx-step.e-con { display: block !important; width: auto; max-width: none; min-width: 0; padding: 0 clamp(10px, 2vw, 28px); text-align: center; }
.cx-chain .cx-step__title .elementor-heading-title {
  margin: 0 0 12px; font-size: max(12px, calc(15px * var(--cx-k))); font-weight: 700; line-height: 1.3;
  text-transform: uppercase; letter-spacing: max(.12em, calc(.2em * var(--cx-k))); color: var(--cx-accent); transition: color .3s;
}
.cx-chain .cx-step.is-hot .cx-step__title .elementor-heading-title { color: var(--cx-white); }
.cx-chain .cx-step__text,
.cx-chain .cx-step__text p { margin: 0; font-size: clamp(14px, 1.15vw, 16px); line-height: 1.6; color: var(--cx-text); }
.cx-chain .cx-step__text p + p { margin-top: 10px; }

.cx-chain.is-narrow .cx-steps.e-con { grid-template-columns: 1fr; margin-top: 24px; }
.cx-chain.is-narrow .cx-step.e-con { padding: 18px 0; text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.cx-chain.is-narrow .cx-step__title .elementor-heading-title { margin-bottom: 8px; letter-spacing: .12em; color: var(--cx-white); }

/* entree */
.cx-chain:not(.is-in) .cx-enter { opacity: 0; }
.cx-chain.is-in .cx-enter { animation-duration: var(--t, .6s); animation-delay: var(--d, 0s); animation-fill-mode: backwards; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.cx-chain.is-in .cx-fade { animation-name: cxFadeUp; }
.cx-chain.is-in .cx-draw { animation-name: cxDraw; stroke-dasharray: 1; }
.cx-chain.is-in .cx-ring.cx-draw { animation-name: cxDrawRing; }
.cx-chain.is-in .cx-pop { animation-name: cxPop; transform-box: fill-box; transform-origin: center; }
.cx-chain.is-in .cx-wipe { animation-name: cxWipe; }
.cx-chain.is-in .cx-label.cx-fade { animation-name: cxFadeUpLabel; }
.cx-chain.is-done .cx-enter { animation: none !important; }
.cx-chain.is-done .cx-draw { stroke-dasharray: none; }
@keyframes cxFadeUp      { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cxFadeUpLabel { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes cxDraw        { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cxDrawRing    { from { stroke-dashoffset: 1; fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes cxPop         { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes cxWipe        { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  .cx-chain .cx-enter { animation: none !important; opacity: 1 !important; }
}

/* ==========================================================================
   2. Generations et jalons (hero About us)
   Le titre, le surtitre et le chapo restent des widgets Elementor (meme
   apparition que l'accueil) ; le fond anime est celui de l'accueil.
   ========================================================================== */

.cx-story {
  --cx-accent: #8CC4E8; --cx-text: rgba(255, 255, 255, 0.72); --cx-cyan: #00ADEF; --cx-white: #FFFFFF;
  --cx-g1: #6F95B8; --cx-g2: #8CC4E8; --cx-g3: #00ADEF;    /* un ton par generation, plus vif vers aujourd'hui */
  --cx-dot-bg: #002A4C;
  color: var(--cx-white);
}
.cx-story * { box-sizing: border-box; }

/* barre des generations */
.cx-story .cx-gens { position: relative; }
.cx-story .cx-gens__segs { display: flex; gap: 4px; }
.cx-story .cx-gens__seg { position: relative; --g: var(--cx-g1); }
.cx-story .cx-gens__seg[data-gen="2"] { --g: var(--cx-g2); }
.cx-story .cx-gens__seg[data-gen="3"] { --g: var(--cx-g3); }
.cx-story .cx-gens__label { display: block; min-height: 50px; padding-right: 12px; }
.cx-story .cx-gens__label b { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--g); }
.cx-story .cx-gens__label > span { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.35; color: var(--cx-white); }
.cx-story .cx-gens__line { display: block; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--g); transform-origin: left center; }
.cx-story .cx-gens__years { position: relative; height: 22px; margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--cx-text); }
.cx-story .cx-gens__years span { position: absolute; top: 0; }
.cx-story .cx-gens__years span:last-child { transform: translateX(-100%); }
.cx-story .cx-gens__rail { position: absolute; left: 0; right: 0; height: 22px; }
.cx-story .cx-gens__window { position: absolute; top: 2px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .28); pointer-events: none;
  transition: left .35s cubic-bezier(.2, .7, .2, 1), width .35s cubic-bezier(.2, .7, .2, 1), opacity .4s ease 1.3s; }
.cx-story .cx-gens__dot { position: absolute; top: 0; width: 22px; height: 22px; margin-left: -11px; padding: 0; border: 0; background: none; cursor: pointer; }
.cx-story .cx-gens__dot::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--cx-dot-bg); border: 2px solid var(--g, var(--cx-g1));
  transition: background-color .25s, transform .25s; }
.cx-story .cx-gens__dot.is-on::before { background: var(--g); }
.cx-story .cx-gens__dot.is-hot::before,
.cx-story .cx-gens__dot:hover::before { transform: scale(1.35); background: var(--cx-white); }
.cx-story .cx-gens__dot:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 1px; border-radius: 50%; }

/* jalons */
.cx-story .cx-tl { position: relative; display: flex; gap: clamp(20px, 2.4vw, 36px); margin: clamp(32px, 3.5vw, 48px) 0 0; padding: 8px 0 4px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.cx-story .cx-tl.is-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%); mask-image: linear-gradient(90deg, transparent, #000 9%); }
.cx-story .cx-tl.is-start.is-end { -webkit-mask-image: none; mask-image: none; }
.cx-story .cx-tl::-webkit-scrollbar { display: none; }
.cx-story .cx-tl:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 4px; border-radius: 6px; }
.cx-story .cx-tl.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.cx-story .cx-ms { --g: var(--cx-g1); flex: 0 0 clamp(230px, 21vw, 268px); scroll-snap-align: start; position: relative; margin: 0; padding-top: 30px; border-top: 1px solid rgba(140, 196, 232, .22); }
.cx-story .cx-ms[data-gen="2"] { --g: var(--cx-g2); }
.cx-story .cx-ms[data-gen="3"] { --g: var(--cx-g3); }
.cx-story .cx-ms::before { content: ""; position: absolute; left: 0; top: -7px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--g); background: var(--cx-dot-bg); transition: background-color .25s, transform .25s; }
.cx-story .cx-ms.is-hot::before { background: var(--g); transform: scale(1.25); }
.cx-story .cx-ms__year { display: block; margin: 0; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; font-weight: 400; letter-spacing: -.01em; color: var(--cx-white); font-variant-numeric: tabular-nums; }
.cx-story .cx-ms__gen { display: inline-block; margin-top: 14px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--g); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g); }
.cx-story .cx-ms__text { margin: 14px 0 0; font-size: clamp(15px, 1.2vw, 16.5px); line-height: 1.55; color: var(--cx-text); }

.cx-story .cx-story__nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.cx-story .cx-story__nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(140, 196, 232, .45);
  background: transparent; color: var(--cx-white); cursor: pointer; transition: border-color .25s, background-color .25s, opacity .25s; }
.cx-story .cx-story__nav button:hover:not(:disabled) { border-color: var(--cx-cyan); background: rgba(0, 173, 239, .12); }
.cx-story .cx-story__nav button:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 2px; }
.cx-story .cx-story__nav button:disabled { opacity: .35; cursor: default; }
.cx-story .cx-story__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 759px) {
  .cx-story .cx-gens__label { min-height: 0; padding-right: 4px; }
  .cx-story .cx-gens__label > span,
  .cx-story .cx-gens__long { display: none; }    /* "1st gen" ; les noms figurent sur les jalons */
  .cx-story .cx-gens__label b { font-size: 10.5px; letter-spacing: .1em; white-space: nowrap; }
  .cx-story .cx-gens__rail { pointer-events: none; }
  .cx-story .cx-ms { flex-basis: 76%; }
  .cx-story .cx-story__nav { display: none; }    /* glisser au doigt */
}

/* entree (declenchee apres le titre du hero, voir cx-blocks.js) */
.cx-story:not(.is-in) .cx-enter,
.cx-story:not(.is-in) .cx-gens__line,
.cx-story:not(.is-in) .cx-gens__dot,
.cx-story:not(.is-in) .cx-gens__window { opacity: 0; }
.cx-story.is-in .cx-enter { animation: cxStoryUp .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) backwards; }
.cx-story.is-in .cx-gens__line { animation: cxStoryGrow .7s cubic-bezier(.4, 0, .2, 1) var(--d, 0s) backwards; }
.cx-story.is-in .cx-gens__dot { animation: cxStoryPop .35s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) backwards; }
.cx-story.is-done .cx-enter,
.cx-story.is-done .cx-gens__line,
.cx-story.is-done .cx-gens__dot { animation: none; }
@keyframes cxStoryUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cxStoryGrow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes cxStoryPop  { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cx-story .cx-enter,
  .cx-story .cx-gens__line,
  .cx-story .cx-gens__dot,
  .cx-story .cx-gens__window { animation: none !important; opacity: 1 !important; transition: none; }
}

/* ==========================================================================
   3. Origines : slider des photos d'archives (About us)
   Widget Carrousel Elementor (classe cx-archive). Chaque diapositive est un
   conteneur .cx-slide : image (.cx-slide__photo) + annee (.cx-slide__year) +
   legende (.cx-slide__text). Pour ajouter une photo : choisir l'image dans le
   widget Image de la diapositive ; pour une diapositive de plus : "Ajouter un
   element" dans les reglages du carrousel. Sans image, un cadre provisoire
   s'affiche. La barre (compteur, segments, fleches) est creee par le JS.
   ========================================================================== */

/* texte de la colonne de gauche (widget Texte, classe cnx-origins-text) */
.cnx-origins-text em { font-style: normal; font-weight: 500; color: #FFFFFF; }
.cnx-origins-text p + p { margin-top: 18px; }

.cx-archive {
  --cx-accent: #8CC4E8; --cx-text: rgba(255, 255, 255, 0.72); --cx-cyan: #00ADEF; --cx-white: #FFFFFF; --cx-border: rgba(255, 255, 255, 0.14);
  position: relative; min-width: 0; width: 100%; color: var(--cx-white);
}
.cx-archive * { box-sizing: border-box; }
.cx-archive .swiper { overflow: hidden; }
.cx-archive .cx-slide.e-con { padding: 0; gap: 16px; }

/* photo */
.cx-archive .cx-slide__photo {
  position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; border: 1px solid var(--cx-border);
  background: radial-gradient(120% 90% at 30% 20%, #8A7A66 0%, #5A4E42 45%, #2C2620 100%);
}
.cx-archive .cx-slide--today .cx-slide__photo { background: radial-gradient(120% 90% at 30% 20%, #3F7FB3 0%, #1D4E7C 50%, #0B2E50 100%); }
.cx-archive .cx-slide__photo .elementor-widget-container { position: static; }
.cx-archive .cx-slide__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0;
  -webkit-user-drag: none; user-select: none;
}
.cx-archive .cx-slide__photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(0, 0, 0, .35); }
.cx-archive .swiper-slide-active .cx-slide__photo img { animation: cxKen 9s ease-out both; }
@keyframes cxKen { from { transform: scale(1.05); } to { transform: scale(1); } }

/* cadre provisoire tant que l'image Elementor par defaut est en place */
.cx-archive .cx-slide__photo img[src*="/placeholder."] { opacity: 0; animation: none; }
.cx-archive .cx-slide__photo:has(img[src*="/placeholder."])::before {
  content: "Archive photo"; position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 246, 232, .7);
}
.cx-archive .cx-slide--today .cx-slide__photo:has(img[src*="/placeholder."])::before { content: "Current photo"; color: rgba(255, 255, 255, .75); }

/* legende : annee + texte */
.cx-archive .cx-slide__caption.e-con { flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 14px; padding: 0; }
.cx-archive .cx-slide__year { flex: 0 0 auto; width: auto; }
.cx-archive .cx-slide__year .elementor-heading-title {
  margin: 0; font-size: 12.5px; line-height: 1.5; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cx-accent);
}
.cx-archive .cx-slide__text { flex: 1 1 0; min-width: 0; width: auto; }
.cx-archive .cx-slide__text,
.cx-archive .cx-slide__text p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--cx-text); text-align: left; }

/* barre : compteur, segments, fleches */
.cx-archive .cx-archive__bar { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.cx-archive .cx-archive__steps { flex: 1; display: flex; gap: 6px; }
.cx-archive .cx-archive__steps button { flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.cx-archive .cx-archive__steps button::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 2px; background: rgba(140, 196, 232, .28); transition: background-color .3s; }
.cx-archive .cx-archive__steps button[aria-current="true"]::before { background: var(--cx-cyan); }
.cx-archive .cx-archive__steps button:hover::before { background: rgba(140, 196, 232, .6); }
.cx-archive .cx-archive__steps button:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 2px; border-radius: 3px; }
.cx-archive .cx-archive__count { flex: none; min-width: 52px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--cx-white); font-variant-numeric: tabular-nums; }
.cx-archive .cx-archive__nav { flex: none; display: flex; gap: 8px; }
.cx-archive .cx-archive__nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(140, 196, 232, .45);
  background: transparent; color: var(--cx-white); cursor: pointer; transition: border-color .25s, background-color .25s, opacity .25s; }
.cx-archive .cx-archive__nav button:hover:not(:disabled) { border-color: var(--cx-cyan); background: rgba(0, 173, 239, .12); }
.cx-archive .cx-archive__nav button:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 2px; }
.cx-archive .cx-archive__nav button:disabled { opacity: .35; cursor: default; }
.cx-archive .cx-archive__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 767px) {
  .cx-archive .cx-archive__bar { gap: 12px; }
  .cx-archive .cx-archive__nav button { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-archive .cx-slide__photo img { animation: none !important; }
}

/* Frise des jalons fournie par la cliente (nov. 2026) : visuels 16:9 sur fond blanc,
   textes integres a l'image. On montre l'image entiere, sans recadrage ni effet. */
.cx-archive .cx-slide--milestones .cx-slide__photo { aspect-ratio: 16 / 9; background: #FFFFFF; border-color: transparent; }
.cx-archive .cx-slide--milestones .cx-slide__photo img { object-fit: contain; animation: none; }
.cx-archive .cx-slide--milestones .cx-slide__photo::after { content: none; }
.cx-archive .cx-slide--milestones .cx-slide__photo:has(img[src*="/placeholder."]) { background: radial-gradient(120% 90% at 30% 20%, #8A7A66 0%, #5A4E42 45%, #2C2620 100%); }
