/* SDI-FORGE / airportandstuff.com - structure.css (v1, auteur CLAUDE)
   Mise en page FONCTIONNELLE et accessible, mobile d'abord. Look volontairement neutre.
   Ne pas modifier : le design se fait dans design.css (variables --* et classes ci-dessous). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-texte, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  color: var(--couleur-texte, #1b1f2a);
  background: var(--couleur-fond, #ffffff);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;       /* pied de page colle au bas de la fenetre */
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--couleur-lien, #1a3a6b); }
h1, h2 { font-family: var(--font-titre, Georgia, "Times New Roman", serif); line-height: 1.15; }

.lien-evitement { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .6rem 1rem; z-index: 100; }
.lien-evitement:focus { left: 0; }

/* ---------- en-tete ---------- */
.site-header {
  position: relative; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem;
  padding: .75rem 1rem;
  background: var(--couleur-entete, #1a3a6b); color: var(--couleur-entete-texte, #ffffff);
}
.logo-texte { margin-right: auto; font-weight: 700; color: inherit; text-decoration: none; }
.nav-principal { display: flex; flex-wrap: wrap; gap: 0 .75rem; }
.nav-principal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .35rem; color: inherit; text-decoration: none; }
.nav-principal a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- boutons ---------- */
.btn-contact, .btn-externe {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: .6rem 1.2rem; border-radius: var(--rayon-bouton, 999px);
  color: #fff; text-decoration: none; font-weight: 600;
}
.btn-contact { background: var(--couleur-accent, #f26b4b); }
.btn-whatsapp { background: var(--couleur-whatsapp, #1fa855); }
.btn-app-adp { background: var(--couleur-app, #1a3a6b); }
.boutons-accueil, .boutons-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }

/* ---------- accueil : bandeau ---------- */
.hero {
  min-height: min(50vh, 380px); display: grid; place-items: center; text-align: center;
  padding: 2.5rem 1rem; color: #fff;
  background-color: var(--couleur-entete, #1a3a6b);
  background-image: var(--hero-image), var(--hero-fond, none);
  background-size: cover; background-position: center;
}
.hero { position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-voile, rgba(8, 20, 45, .28)); }  /* voile pour la lisibilite du titre sur la photo */
.hero-contenu { max-width: 40rem; position: relative; }
.hero h1 { margin: 0 0 1.25rem; font-size: clamp(1.9rem, 6.5vw, 3.2rem); }

/* ---------- accueil : selecteur de terminaux ---------- */
.acces-rapide { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.acces-rapide h2 { text-align: center; font-size: clamp(1.3rem, 4vw, 1.9rem); }
.aide-selecteur { display: none; margin: .25rem 0 1rem; text-align: center; font-size: 1.05rem; color: var(--couleur-discret, #5b6475); }
.js-actif .aide-selecteur { display: block; }

.selecteur { --bulle-d: clamp(120px, 22vw, 190px); display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.bulle {
  width: var(--bulle-d); height: var(--bulle-d);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--bulle-rayon, 26%);      /* carre aux bords arrondis, comme les tuiles de l'ancien site */
  background: var(--couleur-bulle, #1a3a6b); color: var(--couleur-bulle-texte, #ffffff);
  text-decoration: none; font-weight: 700; -webkit-user-select: none; user-select: none;
}
.bulle-court { font-size: calc(var(--bulle-d) * .36); line-height: 1; }
.bulle-detail { margin-top: .25em; font-size: calc(var(--bulle-d) * .115); font-weight: 400; opacity: .9; }
.bulle:focus-visible { outline: 3px solid var(--couleur-focus, #ffb703); outline-offset: 3px; }

/* mode tactile (JS actif) : les bulles sont positionnees et mises a l'echelle par selecteur.js (transform) */
.selecteur.js {
  position: relative; display: block; height: min(80vh, 700px); overflow: hidden;
  touch-action: none; cursor: grab; border-radius: var(--rayon-zone, 20px);
  background: var(--fond-selecteur, transparent);
}
.selecteur.js:active { cursor: grabbing; }
.selecteur.js .bulle {
  position: absolute; left: 50%; top: 50%;
  margin: calc(var(--bulle-d) / -2) 0 0 calc(var(--bulle-d) / -2);
  transform-origin: center; will-change: transform;
  opacity: calc(.18 + var(--profondeur, 1) * .82);   /* profondeur : 0 = derriere la sphere, 1 = devant (pose par selecteur.js) */
}

/* ---------- pages de plan ---------- */
.page-plan, .page-contact { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.fil-ariane a { display: inline-flex; align-items: center; min-height: 44px; }
.plan-viewport {
  overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom;
  background: #fff; border: 1px solid var(--couleur-bordure, #d9dde5); border-radius: var(--rayon-zone, 12px);
}
.plan-svg { display: block; width: 100%; height: auto; min-width: min(var(--plan-largeur), 900px); }
.aide-plan { margin: .5rem 0 0; font-size: .9rem; color: var(--couleur-discret, #5b6475); }

/* numeros de postes dans le plan (texte SVG vivant) */
.poste { cursor: pointer; text-decoration: none; }
.poste text { font-family: var(--font-plan, "Myriad Pro", "Segoe UI", Arial, sans-serif); font-weight: 700; }
.poste-label { fill: var(--poste-bleu, #283b87); }
.poste-tel-debut, .poste-tel-fin { fill: var(--poste-tel, #0a7d3b); }   /* numero : UNE seule couleur, distincte du nom (bleu) et des portes (rouge) */
.poste:hover text, .poste:focus text { text-decoration: underline; }

/* mise en page d une page de terminal : plan a gauche, numeros a droite (empiles sur telephone) */
.plan-mise-en-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: .5rem; }
.plan-numeros { display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .plan-mise-en-page.avec-numeros { grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.5rem; }
  .avec-numeros .plan-svg { min-width: 0; }
  .plan-numeros { position: sticky; top: 1rem; }
}

.postes-liste h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.postes-liste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.postes-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem;
  padding: .4rem .9rem; border: 1px solid var(--couleur-bordure, #d9dde5); border-radius: var(--rayon-zone, 12px); }
.postes-liste .poste-tel { color: var(--poste-tel, #0a7d3b); }
.poste-nom { font-weight: 600; font-size: 1.05rem; }
.poste-tel { display: inline-flex; align-items: center; min-height: 48px; font-weight: 800; font-size: 1.25rem;
  font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.referents-liste li { border-left: 5px solid var(--couleur-lien, #1a3a6b); }
.plan-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.plan-nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- pied de page ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.5rem 1rem;
  background: var(--couleur-entete, #1a3a6b); color: var(--couleur-entete-texte, #ffffff);
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- page contact : formulaire classique ---------- */
.form-intro { max-width: 40rem; }
.form-contact { display: grid; gap: 1rem; max-width: 36rem; margin: 1.25rem 0; }
.champ label { display: block; margin-bottom: .3rem; font-weight: 600; }
.champ input, .champ select, .champ textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--couleur-bordure, #c8cdd8); border-radius: var(--rayon-champ, 10px);
}
.champ textarea { min-height: 9rem; resize: vertical; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible { outline: 3px solid var(--couleur-focus, #ffb703); outline-offset: 2px; }
.champ-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-rgpd { margin: 0; font-size: .9rem; color: var(--couleur-discret, #5b6475); }
.btn-envoyer {
  justify-self: start; min-height: 44px; padding: .6rem 1.6rem; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  color: #fff; background: var(--couleur-accent, #f26b4b); border-radius: var(--rayon-bouton, 999px);
}
.btn-envoyer[disabled] { opacity: .6; cursor: progress; }
.form-statut { margin: 0; min-height: 1.5em; }
.form-statut.ok { color: var(--couleur-succes, #1b6e3a); }
.form-statut.erreur { color: var(--couleur-erreur, #b3261e); }
.contact-direct { margin-top: 1.5rem; }

/* ---------- boutons externes : pictogramme + texte sur deux lignes ---------- */
.btn-externe { gap: .7rem; padding: .55rem 1.3rem; text-align: left; }
.btn-icone { flex: none; width: 24px; height: 24px; }
.btn-texte { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-titre { font-weight: 700; }
.btn-sous { font-size: .85rem; font-weight: 400; opacity: .92; }


/* Tactile : la zone garde le geste meme quand le doigt demarre sur une tuile
   (sinon le navigateur le reserve au defilement et annule le glissement). */
.selecteur.js { touch-action: none; -webkit-user-select: none; user-select: none; }
.selecteur.js .bulle { touch-action: none; -webkit-user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Tactile : le cadre garde le geste, la page reste defilable AUTOUR du cadre.
   - cadre moins haut (jamais tout l'ecran), gouttieres libres a gauche et a droite
   - cadre visible pour que l'on sache ou l'on fait tourner et ou l'on fait defiler */
.selecteur.js {
  --gouttiere: clamp(28px, 9vw, 72px);
  width: calc(100% - 2 * var(--gouttiere));
  max-width: 640px;
  margin-inline: auto;
  height: min(62vh, 560px);
  height: min(62svh, 560px);
  min-height: 300px;
  background: rgba(26, 58, 107, .06);
  border: 1.5px dashed rgba(26, 58, 107, .35);
}
.aide-selecteur strong { color: var(--couleur-entete, #1a3a6b); }

/* Cadre du selecteur plus grand : il prend la place disponible, le reste de la page est decale vers le bas. */
.selecteur.js {
  --bulle-d: clamp(150px, 27vw, 230px);
  --gouttiere: clamp(24px, 6vw, 64px);
  max-width: 900px;
  height: min(78vh, 760px);
  height: min(78svh, 760px);
  min-height: 380px;
}

/* Le cadre occupe la majorite de la place visible, et s'adapte a l'ecran (largeur ET hauteur). */
.selecteur.js {
  --bulle-d: clamp(150px, min(28vw, 32vh), 300px);
  --bulle-d: clamp(150px, min(28vw, 32svh), 300px);
  --gouttiere: clamp(20px, 5vw, 56px);
  max-width: 1100px;
  height: clamp(420px, 84vh, 900px);
  height: clamp(420px, 84svh, 900px);
  min-height: 0;
}

/* Grands ecrans : le cadre garde la majorite de la largeur. */
.acces-rapide { max-width: 1600px; }
.selecteur.js {
  max-width: 1500px;
  height: clamp(420px, 84vh, 1000px);
  height: clamp(420px, 84svh, 1000px);
  --bulle-d: clamp(150px, min(28vw, 32svh), 340px);
}

/* Bords du cadre : plus de pointilles nets, un fondu doux (visible mais pas tranche). */
.selecteur.js {
  border: 0;
  background: rgba(26, 58, 107, .075);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
                      linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
              linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}

/* Bandeau avec photo (livraison GPT 20261014-1304) : l'avion reste visible sur telephone, voile pour le titre blanc. */
.hero { background-position: 65% 50%; --hero-voile: rgba(8, 20, 45, .45); }

/* numeros utiles (Manut, Agent nuit) : visibles sur l accueil et sur chaque terminal */
.numeros-utiles li { border-left: 5px solid var(--couleur-accent, #f26b4b); }
.numeros-utiles-accueil { max-width: 36rem; margin: 1.5rem auto 2rem; padding: 0 1rem; }
