/* ═══════════════════════════════════════════════════════════════
   Ikala-Ni | Accueil
   Chargée après commun.css. Ne contient que ce qui est propre
   à la page d'accueil, dans l'ordre des sections.

   Sommaire
     1. Réglages de la page (espacement des sections, titres)
     2. Hero
     3. Scène : la maquette Figma dessinée en direct
     4. Bandeau clients
     5. Projets
     6. Savoir-faire
     7. Méthode
     8. Services
     9. À propos
    10. Contact
    11. Mouvement propre à l'accueil
    12. Accessibilité du mouvement et écrans tactiles
    13. Responsive
   ═══════════════════════════════════════════════════════════════ */


/* ═════════ 1. RÉGLAGES DE LA PAGE ═════════ */
section { padding: clamp(72px, 9.5vw, 128px) 0; }

h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); line-height: 1.04; margin-top: 22px; }

/* En-tête de section : titre à gauche, courte présentation à droite */
.entete-section { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-bottom: 72px; }
.entete-section > p { max-width: 24em; color: var(--texte-2); }
/* Variante empilée (Services) : le texte passe sous le titre */
.entete-empile { grid-template-columns: 1fr; gap: 20px; }
.entete-empile > p { max-width: 36em; }

/* Encadré presque invisible, parcouru par un filament de lumière.
   pathLength=100 : un tour de cadre vaut 100, quelle que soit sa taille,
   donc le filament avance toujours à la même vitesse.
   À chaque tour, il apparaît, file, puis s'efface. */
.encadre { position: relative; padding: clamp(28px, 5vw, 56px); border: 1px solid var(--filet); }

/* Relief, sans mouvement : le bloc paraît posé en avant du reste de la page.
   Sur fond noir une ombre noire ne se voit pas, donc on joue sur la lumière :
   surface un peu plus claire, arête haute éclairée, halo or diffus dessous,
   et texte qui projette une ombre douce sur la surface. */
.encadre {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 40px 80px -30px rgba(201, 168, 76, 0.18),
    0 18px 40px -12px rgba(0, 0, 0, 0.9);
}
.encadre h2, .encadre > p { text-shadow: 0 6px 18px rgba(0, 0, 0, 0.85), 0 2px 4px rgba(0, 0, 0, 0.6); }
/* Mots en dégradé (texte découpé dans le fond) : text-shadow passerait par-dessus et le salirait */
.encadre .metal { text-shadow: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85)); }
.fil {
  position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px);
  overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 4px var(--or)) drop-shadow(0 0 10px rgba(201, 168, 76, 0.5));
  animation: fil-souffle 8s ease-in-out infinite;
}
.fil rect {
  x: 0.5px; y: 0.5px; width: calc(100% - 1px); height: calc(100% - 1px);
  fill: none; stroke: var(--or); stroke-width: 1.5; stroke-dasharray: 6 94;
  animation: fil-courant 8s linear infinite;
}
@keyframes fil-courant { to { stroke-dashoffset: -100; } }
@keyframes fil-souffle { 0%, 100% { opacity: 0; } 20%, 65% { opacity: 1; } }


/* ═════════ 2. HERO ═════════ */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 140px 0 96px; overflow: hidden; }

/* Halo doré fixe derrière la maquette */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px circle at 70% 40%, rgba(201, 168, 76, 0.13), transparent 60%),
    radial-gradient(900px circle at 85% 110%, rgba(201, 168, 76, 0.07), transparent 60%);
}

.hero .conteneur { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 72px; align-items: center; width: 100%; }

.hero .repere { white-space: nowrap; letter-spacing: 0.14em; }
.hero .repere::after { display: none; }

.hero h1 {
  font-family: var(--titre); font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 5rem); line-height: 0.98; letter-spacing: -0.025em;
  margin: 28px 0 36px;
}
/* Chaque ligne masque son texte pour qu'il puisse « monter » à l'arrivée */
.hero h1 .ligne { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero h1 .ligne > span { display: inline-block; }
.hero h1 em { font-style: italic; }
/* Troisième ligne : les trois temps du métier, plus petite pour tenir sur une ligne */
.hero h1 .ligne-trio { font-size: 0.4em; letter-spacing: 0; margin-top: 0.55em; white-space: nowrap; }

.hero-promesse { max-width: 24em; margin-bottom: 16px; font-family: var(--titre); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.3; }
.hero-texte { max-width: 31em; color: var(--texte-2); font-size: 1.125rem; line-height: 1.6; }

/* Signature : nom et métier, sous une demi-ligne dorée */
.signature { position: relative; display: flex; align-items: center; gap: 16px; margin: 32px 0 44px; padding-top: 28px; }
.signature::before { content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 1px; background: var(--filet-or); }
.signature strong { display: block; font-weight: 500; letter-spacing: 0.02em; }
.signature span { font-size: 0.875rem; color: var(--texte-2); }

/* Invitation à défiler, en bas du hero */
.defiler {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 0.625rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--texte-2);
}
.defiler i { position: relative; width: 1px; height: 52px; background: var(--filet); overflow: hidden; }
.defiler i::after { content: ''; position: absolute; inset: 0; background: var(--or); transform: translateY(-100%); }


/* ═════════ 3. SCÈNE : LA MAQUETTE FIGMA DESSINÉE EN DIRECT ═════════
   Une fausse fenêtre Figma dans laquelle un curseur dessine le hero de cette page,
   puis clique sur « Présenter » : les panneaux s'effacent et la maquette devient le site.
   Le déroulé est piloté par js/ikala/scene-figma.js, qui pose des classes d'état :
     .pret      la fenêtre est prête, le nom du cadre s'affiche
     .trace     un élément est dévoilé (outil rectangle)
     .rempli    un élément reçoit sa couleur
     .stylise   un titre passe en italique or
     .en-ligne  état final : la maquette devient le site
     .efface    fondu de fin de tour, avant la remise à zéro

   Tailles en cqw (pourcentage de la largeur du conteneur) : la fenêtre entière
   s'agrandit ou rétrécit d'un bloc, sans aucun point de rupture. */

.scene { position: relative; perspective: 1200px; }

/* Cadre à liseré or, incliné en 3D selon la position de la souris (--rx, --ry posés par js/ikala/accueil.js) */
.scene-cadre {
  position: relative; padding: 1px; border-radius: 12px;
  background: linear-gradient(140deg, rgba(232, 207, 134, 0.7), rgba(201, 168, 76, 0.08) 40%, rgba(201, 168, 76, 0.5));
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), 0 0 80px -20px rgba(201, 168, 76, 0.25);
  transform: rotateY(calc(var(--ry, -8) * 1deg)) rotateX(calc(var(--rx, 4) * 1deg));
  transition: transform 0.6s var(--ease);
}
.scene-ecran { border-radius: 11px; overflow: hidden; container-type: inline-size; }

/* Fenêtre Figma : barre d'outils en haut, puis calques | canevas | propriétés */
.fg {
  --bleu: #0d99ff;          /* bleu de sélection de Figma */
  --ui: #0c0c0c;            /* fond des panneaux */
  --ui-filet: #1f1f1f;      /* séparations des panneaux */
  position: relative; display: grid; grid-template-rows: 6% 1fr; aspect-ratio: 1 / 1.15; overflow: hidden;
  background: #000; color: #cfcfcf; font-size: 2.1cqw; line-height: 1.3;
}
.fg p { margin: 0; }
.fg > * { transition: opacity 0.6s; }
.fg.efface > * { opacity: 0; }
.fg.instantane, .fg.instantane * { transition: none !important; }   /* remise à zéro sans animation */

/* Barre d'outils, qui devient barre d'adresse une fois en ligne */
.fg-barre { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 2.4%; background: var(--ui); border-bottom: 1px solid var(--ui-filet); }
.fg-outils { display: flex; align-items: center; gap: 0.5em; transition: opacity 0.5s; }
.fg-logo { display: grid; grid-template-columns: repeat(2, 0.42em); gap: 0.08em; margin-right: 0.5em; }
.fg-logo i { width: 0.42em; height: 0.42em; border-radius: 50%; background: #444; }
.fg-logo i:nth-child(1) { background: var(--or); }
.fg-logo i:nth-child(5) { grid-column: 1; }
.fg-outil { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 0.3em; font-size: 0.8em; color: #888; }
.fg-outil.actif { background: var(--bleu); color: #fff; }
.fg-fichier, .fg-url { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.85em; color: #888; white-space: nowrap; transition: opacity 0.6s; }
.fg-fichier span { color: #cfcfcf; }
.fg-url { opacity: 0; display: flex; align-items: center; gap: 0.5em; padding: 0.3em 1.6em; border-radius: 999px; background: #111; color: #cfcfcf; }
/* Petit cadenas de la barre d'adresse, dessiné en CSS */
.fg-cadenas { position: relative; width: 0.6em; height: 0.5em; border-radius: 0.1em; background: var(--or); }
.fg-cadenas::before { content: ''; position: absolute; left: 0.1em; top: -0.32em; width: 0.4em; height: 0.4em; border: 0.08em solid var(--or); border-bottom: 0; border-radius: 0.2em 0.2em 0 0; }
.fg-actions { display: flex; align-items: center; gap: 0.6em; transition: opacity 0.5s; }
.fg-avatar { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--or); color: #000; font-family: var(--titre); font-style: italic; font-size: 0.85em; }
.fg-lecture { display: grid; place-items: center; width: 1.9em; height: 1.6em; border-radius: 0.3em; font-size: 0.7em; background: #1b1b1b; color: #cfcfcf; transition: background 0.2s, transform 0.2s; }
.fg-lecture.presse { background: var(--bleu); color: #fff; transform: scale(0.88); }

/* Corps : calques | canevas | propriétés */
.fg-corps { display: grid; grid-template-columns: 20% 1fr 21%; min-height: 0; transition: grid-template-columns 1.1s var(--ease); }
.fg-calques, .fg-props { padding: 0.9em 0.7em; overflow: hidden; white-space: nowrap; background: var(--ui); transition: opacity 0.5s; }
.fg-calques { border-right: 1px solid var(--ui-filet); }
.fg-props { border-left: 1px solid var(--ui-filet); }
.fg-titre-panneau { margin-bottom: 0.9em !important; font-size: 0.8em; font-weight: 600; color: #fff; }
.fg-calque { padding: 0.35em 0.5em 0.35em 1.4em; border-radius: 0.3em; font-size: 0.72em; color: #9a9a9a; transition: background 0.3s, color 0.3s; }
.fg-calque.actif { background: rgba(13, 153, 255, 0.22); color: #fff; }
.fg-libelle { margin-top: 1.1em !important; margin-bottom: 0.4em !important; font-size: 0.65em; color: #777; }
.fg-champ { display: flex; align-items: center; gap: 0.5em; padding: 0.45em 0.6em; border-radius: 0.3em; background: #151515; font-size: 0.72em; }
.fg-pastille { width: 0.9em; height: 0.9em; border-radius: 0.15em; background: var(--or-metal); }
/* Un champ modifié clignote brièvement en bleu */
.fg-champ .flash { animation: flash 0.7s; }
@keyframes flash { from { color: var(--bleu); } }

/* Canevas : le plan de travail garde le format d'un écran */
.fg-canevas { position: relative; display: grid; min-width: 0; padding: 12% 6% 6%; background: #000; transition: padding 1.1s var(--ease); }
.fg-plan { position: relative; }
.fg-nom-cadre { position: absolute; bottom: calc(100% + 0.4em); left: 0; font-size: 0.6em; color: #777; opacity: 0; transition: opacity 0.4s; }
.fg.pret .fg-nom-cadre { opacity: 1; transition-delay: 1.6s; }
.fg.pret.en-ligne .fg-nom-cadre { opacity: 0; transition-delay: 0s; }

/* Outil rectangle : l'élément est déjà à sa taille, on le dévoile depuis le coin haut-gauche */
.fg-cadre, .fgr { clip-path: inset(0 100% 100% 0); transition: clip-path 0.8s cubic-bezier(0.45, 0, 0.2, 1), background 0.6s, box-shadow 0.6s; }
.fg-cadre.trace, .fgr.trace { clip-path: inset(0 0 0 0); }
.en-cours { box-shadow: inset 0 0 0 1.5px var(--bleu); }

.fg-cadre { position: absolute; inset: 0; container-type: inline-size; background: transparent; }
.fg-cadre.rempli { background: #050505; box-shadow: inset 0 0 0 1px #262626; }

/* Éléments dessinés dans le cadre (copie fidèle du hero de cette page) */
.fge { position: absolute; margin: 0; white-space: nowrap; color: var(--texte); }
/* Curseur de saisie qui suit le texte tapé */
.saisie::after { content: ''; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -0.12em; background: var(--bleu); }

.fge-logo { left: 5%; top: 3.4cqw; font-family: var(--titre); font-size: 2.3cqw; }
.fge-liens { right: 5%; top: 4cqw; font-size: 1.15cqw; color: var(--texte-2); white-space: pre; }
.fge-surtitre { left: 5%; top: 12cqw; font-size: 0.95cqw; letter-spacing: 0.18em; color: var(--or); }
.fge-titre { left: 5%; top: 15cqw; font-family: var(--titre); font-size: 5.4cqw; line-height: 1; letter-spacing: -0.02em; }
.fge-titre span { display: block; min-height: 1em; }
.fge-titre span:last-child { margin-top: 0.5em; font-size: 0.4em; transition: color 0.6s; }
.fge-texte { left: 5%; top: 36.5cqw; width: 42%; font-size: 1.2cqw; line-height: 1.55; color: var(--texte-2); white-space: normal; }

/* Les deux titres de la maquette passent en italique or (classe .stylise) */
.fge-titre.stylise span:last-child,
.fge-titre2.stylise span:last-child {
  font-style: italic; background: var(--or-metal); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.fge-btn1, .fge-btn2 { top: 47.5cqw; display: grid; place-items: center; width: 17%; height: 4.7cqw; border-radius: 999px; font-size: 1.15cqw; font-weight: 500; }
.fge-btn1 { left: 5%; }
.fge-btn2 { left: 24%; }
.fge-btn1.rempli { background: var(--or-metal); background-size: 200% 100%; color: #000; }
.fge-btn2.rempli { box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.45); }
.fge-btn1.survol { background-position: 100% 0; box-shadow: 0 0 1.6em rgba(201, 168, 76, 0.55); transition: background-position 0.6s, box-shadow 0.6s; }

/* Début de la section Projets, sous le hero de la maquette */
.fge-rep2 { left: 5%; top: 62cqw; font-size: 0.95cqw; letter-spacing: 0.18em; color: var(--texte-2); }
.fge-titre2 { left: 5%; top: 64.5cqw; width: 70%; font-family: var(--titre); font-size: 3.4cqw; line-height: 1.1; white-space: normal; }

/* Deux cartes projet au même rendu que la vraie section : appareils posés sur le noir, halo or */
.fge-carte { top: 74cqw; width: 43%; height: 30cqw; border-radius: 0.8cqw; overflow: hidden; }
.fge-carte1 { left: 5%; }
.fge-carte2 { left: 52%; }
.fge-carte.rempli { background: radial-gradient(circle at 50% 45%, rgba(201, 168, 76, 0.16), transparent 62%), #050505; box-shadow: inset 0 0 0 1px var(--filet); }
.fge-carte i, .fge-carte b { position: absolute; left: 50%; opacity: 0; transition: opacity 0.6s 0.2s; }
.fge-carte i { border: 0.5cqw solid #111; background: #fff center top / cover no-repeat; box-shadow: 0 2cqw 3cqw -1cqw rgba(0, 0, 0, 0.8); }
.fge-carte.rempli i, .fge-carte.rempli b { opacity: 1; }
/* Carte 1 : portable HandiPro31 (écran + base) */
.fge-carte1 i { top: 16%; width: 66%; aspect-ratio: 16 / 10; translate: -50% 0; border-radius: 0.7cqw 0.7cqw 0.2cqw 0.2cqw; background-image: url('../../assets/images/projets/mobile/handipro-page.webp'); }
.fge-carte1 b { top: 78%; width: 74%; height: 1.1cqw; translate: -50% 0; border-radius: 0 0 1cqw 1cqw; background: linear-gradient(180deg, #dadde1, #858990); }
/* Carte 2 : tablette Crescendo */
.fge-carte2 i { top: 17%; width: 70%; aspect-ratio: 1194 / 834; translate: -50% 0; border-width: 0.8cqw; border-radius: 1.4cqw; background-image: url('../../assets/images/projets/mobile/crescendo-page.webp'); }

/* Visuel de droite : la page dans la page (mise en abyme) */
.fge-visuel { left: 57%; top: 12cqw; width: 38%; height: 43.7cqw; border-radius: 0.6cqw; overflow: hidden; }
.fge-visuel.rempli { background: #0a0a0a; box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.55), 0 0 3cqw -1cqw rgba(201, 168, 76, 0.4); }
/* La copie de la fenêtre, réduite à la taille du visuel par le script */
.fg-miroir { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s 0.2s; }
.fge-visuel.rempli .fg-miroir { opacity: 1; }
.fg-miroir-ecran { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: inline-size; pointer-events: none; }
.fg-miroir *, .fg-miroir *::before, .fg-miroir *::after { transition: none !important; animation: none !important; }

/* Cadre de sélection bleu avec ses quatre poignées, et l'étiquette de dimensions */
.fg-selection { position: absolute; border: 1.5px solid var(--bleu); pointer-events: none; opacity: 0; transition: left 0.5s var(--ease), top 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease), opacity 0.3s; }
.fg-selection.active { opacity: 1; }
.fg-selection i { position: absolute; width: 0.55em; height: 0.55em; background: #fff; border: 1.5px solid var(--bleu); }
.fg-selection i:nth-child(1) { left: -0.3em; top: -0.3em; }
.fg-selection i:nth-child(2) { right: -0.3em; top: -0.3em; }
.fg-selection i:nth-child(3) { left: -0.3em; bottom: -0.3em; }
.fg-selection i:nth-child(4) { right: -0.3em; bottom: -0.3em; }
.fg-taille { position: absolute; left: 50%; top: calc(100% + 0.5em); transform: translateX(-50%); padding: 0.1em 0.4em; border-radius: 0.2em; background: var(--bleu); color: #fff; font-size: 0.6em; white-space: nowrap; }

/* Curseur multijoueur « Mercia », déplacé par le script */
.fg-curseur { position: absolute; left: 0; top: 0; z-index: 5; display: flex; align-items: flex-start; gap: 0.2em; transform: translate(70%, 120%); transition: transform 0.85s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.6s; pointer-events: none; }
.fg-curseur svg { width: 1.1em; height: auto; fill: var(--or); stroke: #000; stroke-width: 1; filter: drop-shadow(0 0.1em 0.2em rgba(0, 0, 0, 0.5)); }
.fg-curseur span { margin-top: 1em; padding: 0.15em 0.5em; border-radius: 0.3em; background: var(--or); color: #000; font-size: 0.65em; font-weight: 600; }
.fg-curseur.parti { opacity: 0; }

/* État final : les panneaux s'effacent, le cadre occupe toute la fenêtre et devient le site */
.fg.en-ligne .fg-corps { grid-template-columns: 0% 1fr 0%; }
.fg.en-ligne .fg-calques, .fg.en-ligne .fg-props, .fg.en-ligne .fg-outils,
.fg.en-ligne .fg-actions, .fg.en-ligne .fg-fichier, .fg.en-ligne .fg-nom-cadre { opacity: 0; }
.fg.en-ligne .fg-url { opacity: 1; transition-delay: 0.4s; }
.fg.en-ligne .fg-canevas { padding: 0; }
.fg.en-ligne .fg-cadre { background: #000; box-shadow: none; }
.fg.en-ligne .fg-curseur span { opacity: 0; transition: opacity 0.3s; }

/* Légende sous la scène : « Maquette Figma ─── Site en ligne », la barre se remplit à la fin */
.scene-etiquette {
  display: flex; align-items: center; gap: 14px; margin-top: 28px;
  font-size: 0.6875rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--texte-2);
}
.scene-etiquette .barre { position: relative; width: 72px; height: 1px; background: var(--filet); overflow: hidden; }
.scene-etiquette .barre::after { content: ''; position: absolute; inset: 0; background: var(--or); transform: scaleX(0); transform-origin: left; }
.scene.fini .scene-etiquette .barre::after { transform: scaleX(1); transition: transform 1.2s var(--ease); }
.scene.fini .scene-etiquette .fin { color: var(--or); transition: color 0.5s 1s; }


/* ═════════ 4. BANDEAU CLIENTS ═════════ */
.clients { padding: 44px 0; border-block: 1px solid var(--filet); }
.clients .conteneur { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: center; }
.clients p { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--texte-2); }
.clients ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 28px; list-style: none; }
.clients li, .clients-decor { font-family: var(--titre); font-style: italic; font-size: clamp(1.125rem, 1.7vw, 1.5rem); }

/* Copie décorative animée par accueil.js (section 3) */
/* Une colonne de même largeur par client (--nb posé par le script) :
   la longueur des noms ne fait plus bouger les cases */
.clients-decor { display: grid; grid-template-columns: repeat(var(--nb, 4), 1fr); gap: 28px; min-width: 0; }
.clients-case { display: grid; overflow: hidden; white-space: nowrap; }
.clients-case > span { grid-area: 1 / 1; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.7s; }
.clients-case > .entre { transform: translateY(100%); opacity: 0; }
.clients-case > .sort { transform: translateY(-100%); opacity: 0; }

.clients-bande { display: flex; flex: none; width: max-content; animation: clients-bande 16s linear infinite; }
.clients-bande span { padding-inline-end: 44px; white-space: nowrap; }
@keyframes clients-bande { to { transform: translateX(-50%); } }


/* ═════════ 5. PROJETS ═════════
   Une grande carte par projet : texte d'un côté, appareil de l'autre.
   Les cartes paires inversent les côtés. */

/* Écart entre les cartes proportionnel à la hauteur d'écran */
.projets { display: grid; gap: clamp(64px, 14vh, 200px); }

.projet {
  display: grid; grid-template-columns: 1fr 1fr; min-height: clamp(560px, 50vw, 700px);
  border: 1px solid var(--filet); border-radius: 14px; overflow: hidden;
}

.projet-texte { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(32px, 5vw, 80px); }

.projet-type { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--or); }
.projet h3 { margin: 18px 0 14px; font-family: var(--titre); font-weight: 500; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1; }
.projet-presta { margin-bottom: 18px; font-size: 1.0625rem; font-weight: 600; }

/* Logo conçu pour le client : signale d'emblée que l'identité est signée Ikala-Ni */
.projet-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.projet-logo img { width: auto; height: 52px; }
.projet-logo figcaption { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--or); }
.logo-crescendo { border-radius: 6% / 10.3%; }                       /* arrondi du fond doré d'origine */
.logo-jaozafy { padding: 4px; border-radius: 8px; background: #fff; } /* logo prévu pour un fond clair */

.projet-desc { max-width: 30em; color: var(--texte-2); }
.projet-filet { width: 56px; height: 2px; margin: 30px 0 18px; background: var(--or); }

/* Adresse du site, soulignée progressivement au survol */
.projet-url {
  font-size: 1.125rem; font-weight: 600; color: var(--or); text-decoration: none;
  background: linear-gradient(var(--or), var(--or)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.projet-url:hover { background-size: 100% 1px; }

.lire { display: inline-flex; align-items: center; gap: 14px; margin-top: 36px; font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.lire .rond {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--filet-or); color: var(--or); transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.lire:hover .rond { background: var(--or); color: var(--noir); }

/* Panneau de l'appareil : posé sur le noir, léger halo or */
.projet-panneau {
  position: relative; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(201, 168, 76, 0.1), transparent 60%);
}
.projet:nth-child(even) .projet-panneau { order: -1; }

/* Appareil dans une carte : ombre portée et léger décalage au défilement.
   --parallaxe est mis à jour par js/ikala/commun.js */
.appareil { position: relative; transform: translateY(calc(var(--parallaxe, 0) * 1px)); }
.appareil img { width: 100%; height: auto; }
.projet:hover .appareil { scale: 1.03; }

/* Taille de chaque appareil dans son panneau */
.projet .telephone { width: min(52%, 320px); }
.projet .tablette { width: 92%; }
.projet .portable { width: 94%; transition: scale 0.8s var(--ease); }
.projet:hover .portable { scale: 1.02; }
/* Le pliable cumule le décalage de parallaxe et sa propre inclinaison */
.projet .pliable { width: 92%; transform: translateY(calc(var(--parallaxe, 0) * 1px)) perspective(1800px) rotateX(5deg); }
.projet:hover .pliable { --ouverture: 4deg; scale: 1; }   /* au survol, il s'ouvre et s'aplatit */

/* Les captures prévues pour les pages ne sont pas arrondies dans un écran */
.ecran img { border-radius: 0; }


/* ═════════ 6. SAVOIR-FAIRE ═════════ */
.verbes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.verbe {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 44px 32px 48px; border: 1px solid var(--filet); border-radius: 8px;
}
/* Lumière qui suit la souris dans la carte (--cx, --cy posés par js/ikala/accueil.js) */
.verbe::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(320px circle at var(--cx, 50%) var(--cy, 50%), rgba(201, 168, 76, 0.16), transparent 70%);
}
.verbe:hover::before { opacity: 1; }
.verbe h3 { margin: 0 0 14px; font-family: var(--titre); font-weight: 400; font-size: 1.6rem; }
.verbe p { color: var(--texte-2); font-size: 0.9375rem; }


/* ═════════ 7. MÉTHODE ═════════
   Grand récit en quatre photos, alternées à gauche et à droite.
   Un fil or descend au milieu au rythme du défilement (--fil, calculé
   dans accueil.js) et chaque pictogramme s'allume quand le fil l'atteint.
   Les photos se dévoilent par un rideau, puis glissent légèrement dans
   leur cadre (--decal, parallaxe). Angles vifs, jamais arrondis.
   Seule section numérotée du site : l'ordre des étapes a un sens. */
.methode { position: relative; display: grid; gap: clamp(88px, 11vw, 160px); margin-top: 96px; padding-block: 24px; list-style: none; counter-reset: etape; }
.methode::before, .methode::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; translate: -50% 0; background: var(--filet); }
.methode::after { background: linear-gradient(var(--or), #e8cf86); transform: scaleY(var(--fil, 0)); transform-origin: top; }

.recit { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(64px, 9vw, 136px); align-items: center; counter-increment: etape; }
.recit:nth-child(even) .recit-visuel { order: 2; }

.recit-photo { position: relative; z-index: 1; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #0d0d0d; }
.recit-photo::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--filet-or); pointer-events: none; }
.recit-photo img {
  position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover;
  translate: 0 calc(var(--decal, 0) * 1px); transition: transform 1.2s var(--ease);
}
.recit:first-child .recit-photo img { object-position: 50% 40%; }
.recit:hover .recit-photo img { transform: scale(1.04); }

/* Pictogramme posé sur le fil, au centre de chaque étape */
.recit .etape-icone {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  display: block; width: 56px; height: 56px; padding: 15px; border-radius: 50%;
  background: var(--noir); border: 1px solid var(--filet);
  fill: none; stroke: var(--texte-2); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round;
  transition: border-color 0.6s var(--ease), stroke 0.6s var(--ease), box-shadow 0.6s var(--ease), scale 0.6s var(--ease);
}
.recit.actif .etape-icone { border-color: var(--or); stroke: var(--or); box-shadow: 0 0 0 8px rgba(201, 168, 76, 0.08); scale: 1.08; }

.recit-texte { max-width: 30rem; }
.recit:nth-child(even) .recit-texte { justify-self: end; }
.recit-texte h3::before {
  content: '0' counter(etape); display: block; margin-bottom: 14px;
  font-family: var(--titre); font-style: italic; font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1;
  background: var(--or-metal); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.recit-texte h3 { margin-bottom: 16px; font-family: var(--titre); font-weight: 400; font-size: clamp(1.625rem, 2.6vw, 2.125rem); }
.recit-texte p { color: var(--texte-2); font-size: 1.0625rem; line-height: 1.7; }

.recit-visuel { margin: 0; }
.recit-legende { margin-top: 8px; color: var(--texte-2); font-size: 0.5625rem; letter-spacing: 0.03em; opacity: 0.8; text-align: right; }

/* Le rideau : la photo se découvre depuis le côté du fil */
.js .recit-photo { clip-path: inset(0 0 0 100%); transition: clip-path 1.4s var(--ease); }
.js .recit:nth-child(even) .recit-photo { clip-path: inset(0 100% 0 0); }
.js .recit.visible .recit-photo { clip-path: inset(0); }
.js .recit-photo img { scale: 1.18; transition: scale 1.8s var(--ease), transform 1.2s var(--ease); }
.js .recit.visible .recit-photo img { scale: 1; }
.js .recit-texte.apparait { transition-delay: 0.25s; }


/* ═════════ 8. SERVICES ═════════
   Liste à lignes : au survol, la ligne s'élargit et un filet or se trace dessous. */
.offres { margin-top: 64px; border-top: 1px solid var(--filet); list-style: none; }
.offre {
  position: relative; display: grid; grid-template-columns: 0.9fr 1.6fr; gap: 24px 48px; align-items: center;
  padding: 40px 8px; border-bottom: 1px solid var(--filet); transition: padding 0.5s var(--ease);
}
.offre::before {
  content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px;
  background: var(--or); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.offre:hover { padding-inline: 24px; }
.offre:hover::before { transform: scaleX(1); }
.offre h3 { font-family: var(--titre); font-weight: 400; font-size: clamp(1.45rem, 2.1vw, 1.8rem); }
.offre p { color: var(--texte-2); }


/* ═════════ 9. À PROPOS ═════════ */
.apropos .conteneur { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 80px; }

/* Portrait discret, cadré en rond, cerclé d'un anneau or espacé */
/* « Ikala-Ni » écrit à la plume, en calligraphie, au rythme d'une main
   Un masque au bord net glisse sur le mot et dévoile l'encre or, comme la
   plume qui avance, d'un seul geste sans arrêt. La vitesse varie d'une lettre
   à l'autre (majuscules plus lentes, tiret rapide), puis le i est posé en
   dernier, comme on met les points sur les i une fois le mot écrit.
   Les étapes du masque (keyframes plume-main) sont calculées à partir de la
   fin de chaque lettre dans le viewBox. Tout démarre quand le bloc devient visible. */
.plume { margin-top: 22px; line-height: 0; }
.plume svg { width: auto; max-width: 100%; height: clamp(2.2rem, 3.6vw, 3.2rem); overflow: visible; }

/* État de départ, seulement si le JS tourne (sinon le mot est simplement affiché) */
.js .plume svg {
  -webkit-mask-image: linear-gradient(90deg, #000 48.5%, transparent 51.5%);
  mask-image: linear-gradient(90deg, #000 48.5%, transparent 51.5%);
  -webkit-mask-size: 220% 100%; mask-size: 220% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
.js .plume .plume-i { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }

.js .visible .plume svg { animation: plume-main 4.2s linear 0.5s forwards;   /* linéaire : aucun ralenti entre les lettres */ }
.js .visible .plume .plume-i { animation: plume-i 0.35s cubic-bezier(0.3, 0, 0.2, 1) 4.70s forwards; }

@keyframes plume-main {
  0% { -webkit-mask-position: 94.2% 0; mask-position: 94.2% 0; }
  16.7% { -webkit-mask-position: 73.8% 0; mask-position: 73.8% 0; }   /* I */
  29.8% { -webkit-mask-position: 65.3% 0; mask-position: 65.3% 0; }   /* k */
  40.5% { -webkit-mask-position: 56.5% 0; mask-position: 56.5% 0; }   /* a */
  52.4% { -webkit-mask-position: 49.1% 0; mask-position: 49.1% 0; }   /* l */
  63.1% { -webkit-mask-position: 42.3% 0; mask-position: 42.3% 0; }   /* a */
  70.2% { -webkit-mask-position: 36.5% 0; mask-position: 36.5% 0; }   /* tiret */
  90.5% { -webkit-mask-position: 15.9% 0; mask-position: 15.9% 0; }   /* N */
  100.0% { -webkit-mask-position: 1.7% 0; mask-position: 1.7% 0; }   /* fin N */
}
/* Le i : posé d'un petit geste vers le bas */
@keyframes plume-i {
  from { opacity: 0; transform: translateY(-6%) scaleY(0.6); }
  to   { opacity: 1; transform: none; }
}

.portrait { position: relative; width: min(100%, 140px); aspect-ratio: 1; margin-top: 36px; }
.portrait::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid var(--filet-or); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 50%; }

.citation { margin-bottom: 32px; font-family: var(--titre); font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.3; }
.citation em { font-style: italic; }
.apropos-texte > p:not(.citation) { max-width: 36em; margin-bottom: 20px; color: var(--texte-2); }
.apropos-texte > p strong { font-weight: 500; color: var(--texte); }

/* Domaines de compétence en grille 2 × 2 */


/* ═════════ 10. CONTACT ═════════ */
.contact { text-align: center; overflow: hidden; }
/* Grand halo doré centré derrière le titre */
.contact::before {
  content: ''; position: absolute; left: 50%; top: 55%; width: 900px; height: 900px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.14), transparent 62%);
}
.contact .conteneur { position: relative; }
/* Repère centré : un filet de chaque côté */
.contact .repere { justify-content: center; }
.contact .repere::before { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--filet-or); }
.contact h2 { margin: 28px auto; font-size: clamp(1.9rem, 4vw, 3.4rem); }
.contact p { max-width: 34em; margin: 0 auto 14px; color: var(--texte-2); font-size: 1.125rem; }
.contact p:last-of-type { margin-bottom: 44px; }
.contact .boutons { justify-content: center; }


/* ═════════ 11. MOUVEMENT PROPRE À L'ACCUEIL ═════════ */

/* Arrivée du hero : les lignes du titre montent, le reste apparaît en fondu.
   --d (posé en style sur l'élément) règle le délai de chaque bloc. */
.js .hero h1 .ligne > span { transform: translateY(110%); animation: monte 1.2s var(--ease) forwards; }
.js .hero h1 .ligne:nth-child(2) > span { animation-delay: 0.1s; }
.js .hero h1 .ligne:nth-child(3) > span { animation-delay: 0.2s; }
.js .hero .metal { animation: reflet 2.4s var(--ease) 1s forwards; }
.js .fondu { opacity: 0; animation: fondu 1.1s var(--ease) forwards; animation-delay: var(--d, 0.5s); }
.js .scene { opacity: 0; animation: scene 1.4s var(--ease) 0.3s forwards; }
.js .defiler i::after { animation: descend 1.4s var(--ease) 3.4s forwards; }

/* Appareils des projets : ils montent dans leur panneau quand la carte devient visible */
.js .appareil { translate: 0 90px; opacity: 0; transition: translate 1.4s var(--ease) 0.15s, opacity 1s var(--ease) 0.15s, scale 0.8s var(--ease); }
.js .visible .appareil { translate: none; opacity: 1; }
.js .projet-filet { transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) 0.5s; }
.js .visible .projet-filet { transform: none; }
/* La page ne s'affiche dans l'écran qu'une fois l'appareil arrivé */
.js .site-defile { opacity: 0; transition: opacity 1s var(--ease) 0.2s; }
.js .visible .site-defile { opacity: 1; }

@keyframes monte { to { transform: none; } }
@keyframes fondu { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes scene { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes reflet { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes descend { to { transform: translateY(100%); } }


/* ═════════ 12. ACCESSIBILITÉ DU MOUVEMENT ET ÉCRANS TACTILES ═════════ */

/* Sans souris, pas d'effet de survol ni d'inclinaison */
@media (hover: none) {
  .scene-cadre { transform: none; }
  .offre:hover { padding-inline: 8px; }
}

/* Au doigt ou sur petit écran, c'est le défilement qui anime : la ligne qui
   passe au milieu de l'écran s'allume (classe .actif posée par accueil.js).
   Même requête que dans le script : certains téléphones Android se déclarent
   à tort « avec survol », la largeur sert de filet de sécurité. */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  .offre::before { transition-duration: 2s; }   /* plus lent qu'au survol : le filet se trace pendant qu'on lit */
  .offre h3 { transition: color 1.5s var(--ease), translate 1.5s var(--ease); }
  .offre.actif::before { transform: scaleX(1); }
  .offre.actif h3 { color: var(--or); translate: 8px 0; }
}

/* Mouvement réduit : tout est affiché d'emblée, dans son état final */
@media (prefers-reduced-motion: reduce) {
  .fil { display: none; }
  .js .fondu, .js .scene { opacity: 1; transform: none; }
  .js .hero h1 .ligne > span { transform: none; }
  .js .appareil, .js .projet-filet, .js .site-defile { translate: none; opacity: 1; transform: none; }
  .methode::after { transform: none; }
  .js .recit-photo, .js .recit:nth-child(even) .recit-photo { clip-path: none; }
  .js .recit-photo img { scale: 1; translate: none; }
  .recit .etape-icone { border-color: var(--or); stroke: var(--or); }
  .scene-cadre { transform: none; }
  .js .plume svg { -webkit-mask-image: none; mask-image: none; }
  .js .plume .plume-i { opacity: 1; animation: none; }
}

/* Même chose quand le visiteur coupe les animations dans les réglages d'accessibilité */
html.a11y-anim-off .fondu, html.a11y-anim-off .scene { opacity: 1; transform: none; }
html.a11y-anim-off .hero h1 .ligne > span { transform: none; }
html.a11y-anim-off .appareil, html.a11y-anim-off .projet-filet, html.a11y-anim-off .site-defile { translate: none; opacity: 1; transform: none; }
html.a11y-anim-off .methode::after { transform: none; }
html.a11y-anim-off .recit-photo { clip-path: none !important; }
html.a11y-anim-off .recit-photo img { scale: 1 !important; translate: none; }
html.a11y-anim-off .recit .etape-icone { border-color: var(--or); stroke: var(--or); }
html.a11y-anim-off .scene-cadre { transform: none; }
html.a11y-anim-off .plume svg { -webkit-mask-image: none; mask-image: none; }
html.a11y-anim-off .plume .plume-i { opacity: 1; animation: none; }
html.a11y-anim-off .clients-bande { animation: none; }
html.a11y-anim-off .fil { display: none; }


/* ═════════ 13. RESPONSIVE ═════════ */
@media (max-width: 1024px) {
  .hero .conteneur { grid-template-columns: 1fr; gap: 0; }
  /* Une seule colonne : la maquette se glisse juste sous le grand titre.
     Le bloc texte s'efface (display: contents) pour que ses enfants
     deviennent des cases de la grille et puissent être réordonnés. */
  .hero .conteneur > div:first-child { display: contents; }
  .hero .conteneur > div:first-child > :not(.repere, h1) { order: 2; }
  .scene { order: 1; width: 100%; max-width: 600px; margin: 0 0 48px; }
  .defiler { display: none; }
  .clients .conteneur { grid-template-columns: 1fr; }
  .clients-decor { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .verbes { grid-template-columns: repeat(2, 1fr); }
  .apropos .conteneur { grid-template-columns: 1fr; gap: 40px; }
  /* Une colonne : repère, « Ikala-Ni » et portrait centrés, comme le bloc Contact */
  .apropos .conteneur > div:first-child { text-align: center; }
  .apropos .repere { justify-content: center; }
  .apropos .repere::before { content: ''; flex: 1; max-width: 120px; height: 1px; background: var(--filet-or); }
  .apropos .plume svg { margin-inline: auto; }
  .apropos .portrait { margin-inline: auto; }
}

@media (max-width: 768px) {
  /* Le surtitre du hero peut revenir à la ligne sur petit écran */
  .hero .repere { white-space: normal; }

  .entete-section { grid-template-columns: 1fr; margin-bottom: 64px; }

  /* Cartes projet : l'appareil passe au-dessus du texte */
  .projets { gap: 56px; }
  .projet { grid-template-columns: 1fr; }
  .projet-panneau, .projet:nth-child(even) .projet-panneau { order: -1; min-height: 0; padding: 48px 0; }
  .projet .telephone { width: min(58%, 260px); }
  .projet .portable { width: 86%; }
  .projet .pliable { width: 94%; }
  .projet .tablette { width: 94%; padding: 9px; border-radius: 18px; border-width: 2px; }
  .tablette::before { top: 2.5px; width: 4px; height: 4px; }
  .tablette::after { top: 3px; width: 3px; height: 3px; transform: translateX(9px); }
  .ecran-tab { border-radius: 6px; }

  .offre { grid-template-columns: 1fr; gap: 10px; }
}

/* Méthode sur une colonne : photo, puis pictogramme à cheval sur son bord, puis texte.
   Le fil passe à gauche, derrière les pictogrammes. */
@media (max-width: 860px) {
  .methode { gap: 72px; margin-top: 64px; }
  .methode::before, .methode::after { left: 28px; }
  .recit { grid-template-columns: 1fr; gap: 0; }
  .recit:nth-child(even) .recit-visuel { order: 0; }
  .recit .etape-icone { position: relative; z-index: 2; left: auto; top: auto; translate: 0; margin: -49px 0 0 0; }
  .recit-texte, .recit:nth-child(even) .recit-texte { justify-self: start; padding-left: 72px; margin-top: 6px; }
  .recit-texte h3::before { font-size: 2.5rem; }
}

@media (max-width: 560px) {
  /* Savoir-faire sur téléphone : on garde 2 colonnes, mais titres et marges
     réduits pour que « Accompagner » tienne entier dans sa carte (dès 320 px). */
  .verbes { gap: 12px; margin-top: 48px; }
  .verbe { padding: 32px 18px 36px; }
  .verbe h3 { font-size: clamp(1rem, 5vw, 1.35rem); margin-bottom: 10px; }
  .verbe p { font-size: 0.875rem; }
}
