/*
 * Portail des outils Aéro-Sotravia.
 *
 * Blanc, logo, une rangée d'icônes : rien d'autre. Les couleurs et la police
 * sont celles du planning (ardoise #384F6A, rouge #E01F26, Poppins), pour
 * qu'on passe de l'un à l'autre sans changer d'univers.
 */
:root {
  --ardoise: #384f6a;
  --rouge: #e01f26;
  --gris: #6b7086;
  --brume: #e4e5ec;
  --ombre: 0 2px 12px rgba(48, 52, 79, 0.1);
  /* Taille des icônes : 72 px comme sur un écran d'accueil de téléphone,
     un peu plus sur grand écran. */
  --icone: 72px;
}

@media (min-width: 768px) {
  :root {
    --icone: 84px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  color: var(--ardoise);
  font-family: Poppins, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Le « A » de la marque, à peine visible, en bas à droite : le même filigrane
   que l'écran de connexion des outils. */
.filigrane {
  position: fixed;
  right: -8vw;
  bottom: -6vh;
  width: min(70vw, 760px);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.entete,
main,
.pied {
  position: relative;
  z-index: 1;
}

/* ---------- En-tête ---------- */
.entete {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(14vh, calc(env(safe-area-inset-top) + 48px)) 24px 0;
}

.logo {
  height: 30px;
  width: auto;
  max-width: 86vw;
}

@media (min-width: 768px) {
  .logo {
    height: 40px;
  }
}

.sous-titre {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gris);
}

/* ---------- Icônes ---------- */
main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 9vh 24px 48px;
}

.outils {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, calc(var(--icone) + 24px));
  gap: 28px 18px;
  justify-content: center;
  /* Six icônes au plus par rangée ; la rangée se resserre au centre. */
  width: min(100%, calc((var(--icone) + 24px) * 6 + 18px * 5));
}

.outil {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  border-radius: 22px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.icone {
  display: grid;
  place-items: center;
  width: var(--icone);
  height: var(--icone);
  /* L'arrondi d'une icône d'iPhone : environ 22 % du côté. */
  border-radius: 22.5%;
  background: var(--fond, var(--ardoise));
  box-shadow: var(--ombre);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.icone svg {
  width: 72%;
  height: 72%;
}

.nom {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  max-width: calc(var(--icone) + 24px);
}

@media (hover: hover) {
  .outil:hover .icone {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(48, 52, 79, 0.18);
  }
}

/* Le léger enfoncement d'une icône qu'on touche. */
.outil:active .icone {
  transform: scale(0.94);
  box-shadow: var(--ombre);
}

.outil:focus-visible .icone {
  outline: 2px solid var(--ardoise);
  outline-offset: 3px;
}

/* ---------- Pied de page ---------- */
.pied {
  padding: 0 24px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gris);
}

.pied p {
  margin: 0;
}

.pied .adresse {
  color: #9a9eb0;
}

@media (prefers-reduced-motion: reduce) {
  .icone {
    transition: none;
  }
}

/* Icône fournie en image (services extérieurs) : elle remplit la tuile,
   l'arrondi la découpe. */
.icone-image {
  overflow: hidden;
  background: #fff;
}

.icone-image img {
  width: 100%;
  height: 100%;
  display: block;
}
