:root {
    --background: #fffcf6;
    --surface: #ffffff;
    --text: #43546a;
    --text-light: #657286;
    --accent: #dfad68;
    --border: #e9b66f;
    --header-height: 76px;
    --content-width: 1180px;
    --card-size: 270px;
    --phi-bg: #fbf7ef;
    --phi-surface: rgba(255, 253, 249, 0.88);
    --phi-surface-solid: #fffdfa;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family:
    "Avenir Next",
    Avenir,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ---------- En-tête ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--accent);
    backdrop-filter: blur(10px);
}

.header-inner {
    width: min(100% - 40px, 1500px);
    min-height: var(--header-height);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.brand {
    position: relative;
    z-index: 110;
    display: flex;
    align-items: center;
    overflow: visible;
}

.brand-symbol {
    width: 47px;
    height: 47px;
    display: grid;
    place-items: center;
    border: 2px solid var(--text);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 30px;
    font-style: italic;
    line-height: 1;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.brand-tagline {
    margin-top: 4px;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
}

.brand-logo {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(22px, 3vw, 48px);
    min-width: 0;
}

.main-nav a,
.account-link {
    position: relative;
    padding-block: 10px;
    font-size: 1.05rem;
    white-space: nowrap;
}

.main-nav a::after,
.account-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.account-link:hover::after,
.account-link:focus-visible::after {
    transform: scaleX(1);
}

.main-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.account-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--text);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 18px;
    font-style: italic;
}

.menu-button {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 26px;
    height: 2px;
    margin: 6px auto;
    background: var(--text);
    transition:
    transform 180ms ease,
    opacity 180ms ease;
}

/* ---------- Contenu principal ---------- */

main {
    min-height: calc(100vh - var(--header-height));
}

.services {
    width: min(100% - 40px, var(--content-width));
    margin-inline: auto;
    padding: clamp(72px, 10vh, 125px) 0 110px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, var(--card-size));
    justify-content: center;
    gap: 110px 145px;
}

.service-card {
    min-height: var(--card-size);
    padding: 30px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px dotted var(--border);
    background: rgba(255, 255, 255, 0.45);
    transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-4px);
    background: var(--surface);
    box-shadow: 0 14px 35px rgba(67, 84, 106, 0.08);
    outline: none;
}

.service-card h2 {
    margin: 0 0 26px;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.25;
}

.service-card p {
    max-width: 230px;
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.35;
}

/* ---------- Tablettes ---------- */

@media (max-width: 1100px) {
    .header-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    }

    .menu-button {
    display: block;
    }

    .main-nav,
    .account-link {
    display: none;
    }

    .site-header.menu-open .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--accent);
    box-shadow: 0 12px 30px rgba(67, 84, 106, 0.08);
    }

    .site-header.menu-open .main-nav a {
    padding: 14px 6px;
    border-bottom: 1px solid rgba(67, 84, 106, 0.08);
    }

    .site-header.menu-open .account-link {
    display: inline-flex;
    margin-top: 8px;
    padding: 12px 6px 2px;
    }

    .site-header.menu-open .menu-button span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    }

    .site-header.menu-open .menu-button span:nth-child(2) {
    opacity: 0;
    }

    .site-header.menu-open .menu-button span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    }

    .services-grid {
    gap: 70px 80px;
    }
}

/* ---------- Sous-menus du header ---------- */

.nav-item {
  position: relative;
}

.nav-link-row {
  display: flex;
  align-items: center;
}

.submenu-toggle {
  display: inline-grid;
  place-items: center;

  width: 28px;
  height: 38px;
  padding: 0;
  margin-left: 2px;

  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.submenu-toggle span {
  display: block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.has-submenu.submenu-open .submenu-toggle span {
  transform: rotate(180deg);
}

/* Sous-menu flottant */

.submenu {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  z-index: 250;

  width: max-content;
  min-width: 220px;
  padding: 9px;

  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(223, 173, 104, 0.65);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(67, 84, 106, 0.14);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, 8px);
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease;
}

.submenu a {
  display: block;
  padding: 11px 14px;

  color: var(--text-light);
  font-size: 0.94rem;
  line-height: 1.3;
  white-space: nowrap;

  border-radius: 5px;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.submenu a:hover,
.submenu a:focus-visible {
  color: var(--text);
  background: #f6f3ee;
  outline: none;
}

/* Retire le soulignement animé du menu principal */

.main-nav .submenu a::after {
  display: none;
}

/* Ouverture sur ordinateur */

@media (min-width: 1101px) {
  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu,
  .has-submenu.submenu-open .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
  .submenu-toggle {
    display: none;
  }
}

/* ---------- Mobiles ---------- */

@media (max-width: 700px) {
    :root {
    --header-height: 68px;
    }

    .header-inner {
    width: min(100% - 24px, 1500px);
    }

    .brand-symbol {
    width: 40px;
    height: 40px;
    font-size: 25px;
    }

    .brand-name {
    font-size: 1.45rem;
    }

    .brand-logo {
    width: 190px;
    max-width: 80%;
    }

    .brand-tagline {
    font-size: 0.68rem;
    }

    .services {
    width: min(100% - 32px, 520px);
    padding: 48px 0 70px;
    }

    .services-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    }

    .service-card {
    width: 100%;
    min-height: 220px;
    padding: 28px 24px;
    }

    .service-card h2 {
    margin-bottom: 18px;
    }

    .service-card p {
    max-width: 34ch;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    }
}

/* ---------- Pied de page ---------- */

.site-footer {
    margin-top: 40px;
    color: var(--text);
    background: #fffefd;
    border-top: 1px solid var(--accent);
}

.footer-inner {
    width: min(100% - 40px, 1180px);
    margin-inline: auto;
    padding: 55px 0 45px;

    display: grid;
    grid-template-columns: 1.4fr 1fr 1.15fr 1fr;
    gap: 55px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo img {
    display: block;
    width: 175px;
    height: auto;
    max-height: 65px;
    object-fit: contain;
}

.footer-brand p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.65;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.footer-column h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.footer-column a {
    position: relative;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.4;
    transition:
    color 180ms ease,
    transform 180ms ease;
}

.footer-column a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;

    height: 1px;
    background: var(--accent);

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.footer-column a:hover,
.footer-column a:focus-visible {
    color: var(--text);
    transform: translateX(2px);
}

.footer-column a:hover::after,
.footer-column a:focus-visible::after {
    transform: scaleX(1);
}

.footer-bottom {
    padding: 18px 20px;
    text-align: center;
    border-top: 1px solid rgba(67, 84, 106, 0.12);
}

.footer-bottom p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.82rem;
}

/* ---------- Tablettes ---------- */

@media (max-width: 950px) {
    .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 45px 70px;
    }

    .footer-brand {
    max-width: none;
    }
}

/* ---------- Mobiles ---------- */

@media (max-width: 600px) {
    .site-footer {
    margin-top: 20px;
    }

    .footer-inner {
    width: min(100% - 32px, 520px);
    padding: 42px 0 35px;

    grid-template-columns: 1fr;
    gap: 35px;
    }

    .footer-logo img {
    width: 155px;
    }

    .footer-column {
    gap: 10px;
    }

    .footer-column h2 {
    margin-bottom: 7px;
    }

    .footer-bottom {
    padding: 17px 16px;
    }
}

@media (max-width: 1100px) {
  .nav-item {
    width: 100%;
  }

  .nav-link-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
  }

  .nav-link-row > a {
    width: 100%;
  }

  .submenu-toggle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
  }

  .submenu {
    position: static;

    width: auto;
    min-width: 0;
    max-height: 0;
    margin: 0 0 0 14px;
    padding: 0 0 0 12px;

    background: transparent;
    border: 0;
    border-left: 2px solid var(--accent);
    border-radius: 0;
    box-shadow: none;

    opacity: 1;
    visibility: visible;
    pointer-events: none;
    overflow: hidden;
    transform: none;

    transition: max-height 220ms ease;
  }

  .has-submenu.submenu-open .submenu {
    max-height: 400px;
    padding-top: 5px;
    padding-bottom: 8px;
    pointer-events: auto;
  }

  .site-header.menu-open .submenu a {
    padding: 11px 12px;
    border-bottom: 0;
    white-space: normal;
  }
}

/* ----------------------------------------------------------
   1. FOND GLOBAL
   Texture très légère : toutes les pages vitrines
   ---------------------------------------------------------- */

html {
  background: var(--phi-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--phi-bg);
  position: relative;
  isolation: isolate;
}

/* L'image reste liée à la fenêtre : elle ne se déforme pas
   lorsque la page est très longue. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image:
    linear-gradient(rgba(251, 247, 239, 0.20), rgba(251, 247, 239, 0.20)),
    url("/web_images/phi-enso-bg-global.webp");

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


/* ----------------------------------------------------------
   2. HERO / GRANDE INTRODUCTION
   Utilise la version lumineuse uniquement sur certaines pages.
   ---------------------------------------------------------- */

.hero-phi {
  position: relative;
  overflow: hidden;
  background-color: rgba(255, 251, 243, 0.72);
}

.hero-phi::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      rgba(255, 253, 248, 0.84) 0%,
      rgba(255, 253, 248, 0.42) 48%,
      rgba(255, 253, 248, 0.18) 100%
    ),
    url("/web_images/phi-enso-bg-hero.webp");

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-phi > * {
  position: relative;
  z-index: 1;
}


/* ----------------------------------------------------------
   3. SECTION PLUS POÉTIQUE / ÉVÉNEMENT / MÉDITATION
   La version rosée reste ponctuelle.
   ---------------------------------------------------------- */

.section-aquarelle {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 253, 249, 0.64), rgba(255, 253, 249, 0.64)),
    url("/web_images/phi-enso-bg-accent.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


/* ----------------------------------------------------------
   4. BLOCS DE CONTENU
   Un léger fond blanc évite que l'aquarelle gêne la lecture.
   ---------------------------------------------------------- */

.card,
.content-card,
.form-panel {
  background: var(--phi-surface);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}


/* ----------------------------------------------------------
   5. MOBILE
   On garde le fond, mais sans artifices coûteux.
   ---------------------------------------------------------- */

@media (max-width: 768px) {
  body::before {
    background-position: 58% center;
  }

  .hero-phi::before {
    background-position: 56% center;
  }

  .card,
  .content-card,
  .form-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 253, 249, 0.94);
  }
}


/* ----------------------------------------------------------
   6. PAGES FONCTIONNELLES
   Ajoute class="page-app" sur <body> pour réservation,
   compte utilisateur, logiciel métier, etc.
   ---------------------------------------------------------- */

body.page-app::before {
  display: none;
}

body.page-app {
  background: #f8f5ef;
}

/* Curseur OM — Phi Enso */
html, body {
  cursor: url('/web_images/om-cursor.png') 24 24, auto;
}

a, button, [role="button"], input[type="submit"] {
  cursor: url('/web_images/om-cursor-hover.png') 28 28, pointer;
}

a:active, button:active, [role="button"]:active {
  cursor: url('/web_images/om-cursor-click.png') 24 24, pointer;
}

input, textarea, [contenteditable="true"] {
  cursor: url('/web_images/om-cursor-text.png') 16 16, text;
}

/* =========================================================
   CURSEUR OM — PHI ENSO
   ========================================================= */

/*
   Le curseur personnalisé n'est activé que sur les appareils
   disposant d'une vraie souris ou d'un trackpad.
   Aucun effet sur smartphone ou tablette tactile.
*/
@media (hover: hover) and (pointer: fine) {

    /* Curseur général */
    html,
    body {
        cursor:
            url("/web_images/om-cursor.png") 24 24,
            auto;
    }


    /* Liens, boutons et éléments interactifs */
    a,
    button,
    summary,
    select,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"] {
        cursor:
            url("/web_images/om-cursor-hover.png") 28 28,
            pointer;
    }


    /* Au moment du clic */
    a:active,
    button:active,
    summary:active,
    [role="button"]:active,
    input[type="button"]:active,
    input[type="submit"]:active,
    input[type="reset"]:active {
        cursor:
            url("/web_images/om-cursor-click.png") 24 24,
            pointer;
    }


    /*
       Pour les champs de saisie, je conserve volontairement
       le curseur texte classique.
       C'est beaucoup plus ergonomique.
    */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    textarea,
    [contenteditable="true"] {
        cursor: text;
    }
  }
/* ==========================================================
   PAGE MERCI
   ========================================================== */

body.page-merci {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
}


/* Le main prend uniquement l'espace disponible
   entre le header et le footer */
.merci-main {
    flex: 1;

    min-height: 0;

    display: flex;
}


/* L'aquarelle remplit entièrement le main */
.merci-section {
    flex: 1;
    width: 100%;

    display: grid;
    place-items: center;

    padding: 80px 24px;
}


/* Contenu central */
.merci-content {
    width: min(100%, 620px);

    padding: clamp(35px, 6vw, 65px);

    text-align: center;

    background: rgba(255, 253, 249, 0.78);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}


/* Supprime l'espace que ton footer possède normalement */
.page-merci .site-footer {
    margin-top: 0;
}

/* ==========================================================
   BOUTON DES PAGES DE CONFIRMATION
   ========================================================== */

.merci-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 22px;
    padding: 12px 24px;

    color: var(--text);
    background: rgba(255, 255, 255, 0.55);

    border: 1px solid var(--accent);
    border-radius: 6px;

    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1;

    text-decoration: none;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}


/* Survol souris */
.merci-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);

    transform: translateY(-2px);

    box-shadow:
        0 8px 22px rgba(67, 84, 106, 0.10);
}


/* Navigation clavier */
.merci-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}


/* Au clic */
.merci-button:active {
    transform: translateY(0);
    box-shadow: none;
}