/* Pages « espaces de La Rampe » (Projets > France) et annuaire des artistes.
   Langage visuel repris du brandbook : panneaux ardoise, grande initiale en filigrane, numéros terracotta sur filet incliné,
   photos en formes organiques, filet magenta. Les cases photo restent vides (« Photo à venir ») tant que les images ne sont pas déposées. */
.espace-page { --esp-ink: #2F4452; --esp-ink-2: #384E5B; --esp-terra: var(--c-terracotta); background: var(--c-white); }
.breadcrumb--light { color: #cfe0ea; }
.breadcrumb--light a { color: #fff; }
.breadcrumb--light li + li::before { color: var(--esp-terra); }

/* ---------- Bandeau ---------- */
.esp-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--esp-ink); color: #fff; padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2.6rem, 6vw, 5rem); }
.esp-hero::after { content: ""; position: absolute; inset: auto -10% -18% -10%; height: 46%; background: rgba(15, 30, 42, .32); transform: skewY(-5deg); z-index: -1; }
.esp-hero__letter { position: absolute; z-index: -1; left: -.06em; top: -.34em; font-size: clamp(22rem, 46vw, 44rem); line-height: 1; font-family: var(--font-main); font-weight: 700; color: rgba(234, 242, 250, .08); pointer-events: none; user-select: none; }
.esp-hero__grid { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 900px) { .esp-hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--space-5); } }
.esp-hero__kicker { position: relative; margin: 0 0 .8rem; padding-left: 3.6rem; color: var(--esp-terra); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; }
.esp-hero__kicker::before { content: ""; position: absolute; left: 0; top: .55em; width: 2.8rem; height: 1px; background: var(--esp-terra); transform: rotate(-8deg); }
.esp-hero h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.08; }
.esp-hero .titlerow .heart { color: #f5c6da; }
.esp-hero__lead { margin: var(--space-3) 0 0; max-width: 38rem; font-size: 1.2rem; color: #e6eef5; }
.esp-jump { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.esp-jump a { display: inline-block; padding: .5rem 1.1rem; border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius-pill); color: #fff; text-decoration: none; font-weight: 700; }
.esp-jump a:hover, .esp-jump a:focus-visible { background: #fff; color: var(--esp-ink); }
.esp-hero--compact { padding-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Cases photo (vides ou remplies) ---------- */
.esp-ph { position: relative; margin: 0; overflow: hidden; background: linear-gradient(150deg, #cfe6ea, #9ccbd3); }
.esp-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.esp-ph--empty { display: grid; place-items: center; background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 14px, rgba(255,255,255,0) 14px 28px), linear-gradient(150deg, #cfe6ea, #9ccbd3); border: 1px dashed rgba(56, 78, 91, .45); color: var(--c-slate); }
.esp-ph--empty span { padding: .3rem .8rem; background: rgba(255, 255, 255, .82); border-radius: var(--radius-pill); font-size: .9rem; font-weight: 700; }
.esp-hero__mosaic { display: grid; grid-template-columns: 1.1fr .9fr; grid-template-rows: 12rem 12rem; gap: .7rem; min-height: 24.7rem; }
.esp-ph--tall { grid-row: 1 / 3; border-radius: 4.5rem .6rem .6rem 1.2rem; background-color: #cfe0ea; }
.esp-ph--round { border-radius: 999px; aspect-ratio: 1; align-self: center; justify-self: center; width: min(100%, 12rem); height: 12rem; background: linear-gradient(150deg, #f2d9c8, #e6b795); }
.esp-ph--wide { border-radius: .6rem 3rem .6rem .6rem; background: linear-gradient(150deg, #ddd0ee, #c3b1d8); }
@media (max-width: 899px) { .esp-hero__mosaic { grid-template-rows: 9rem 9rem; min-height: 0; } .esp-ph--round { height: 9rem; width: 9rem; } }

/* ---------- Sections ---------- */
.esp-section { padding: clamp(2.4rem, 5vw, 4.2rem) 0; }
.esp-section--tint { background: var(--c-bg-light); }
.esp-title { display: flex; align-items: baseline; gap: .9rem; margin: 0 0 var(--space-3); color: var(--c-blue-ink); font-size: clamp(1.6rem, 3vw, 2.3rem); }
.esp-title__n { position: relative; color: var(--esp-terra); font-size: 1.6em; font-weight: 700; padding-right: 1.6rem; line-height: 1; }
.esp-title__n::after { content: ""; position: absolute; right: 0; bottom: .15em; width: 1.3rem; height: 1px; background: var(--esp-terra); transform: rotate(-12deg); }
.esp-more { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 900px) { .esp-more { grid-template-columns: 1.4fr 1fr; gap: var(--space-5); } }
.esp-more__text { max-width: 42rem; }
.esp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.esp-facts li { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.2rem; background: var(--c-white); border: 1px solid var(--c-border); border-left: 4px solid var(--c-magenta); border-radius: var(--radius-sm); }
.esp-facts strong { font-size: 1.5rem; color: var(--c-blue-ink); line-height: 1.15; }
.esp-facts span { color: var(--c-slate); font-size: .95rem; }
.esp-note { color: var(--c-slate); font-size: .95rem; }

/* Galerie : 6 cases en mosaïque */
.esp-gallery { display: grid; gap: .7rem; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(5rem, 11vw, 9rem); }
.esp-gallery__1 { grid-area: 1 / 1 / 3 / 4; border-radius: 2.6rem .6rem .6rem .6rem; }
.esp-gallery__2 { grid-area: 1 / 4 / 2 / 7; border-radius: .6rem; }
.esp-gallery__3 { grid-area: 2 / 4 / 4 / 5; border-radius: .6rem; }
.esp-gallery__4 { grid-area: 2 / 5 / 3 / 7; border-radius: .6rem 2.4rem .6rem .6rem; }
.esp-gallery__5 { grid-area: 3 / 1 / 4 / 4; border-radius: .6rem .6rem .6rem 2.4rem; }
.esp-gallery__6 { grid-area: 3 / 5 / 4 / 7; border-radius: .6rem; }
@media (max-width: 699px) { .esp-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 8rem; } .esp-gallery figure { grid-area: auto !important; } .esp-gallery__1 { grid-column: 1 / 3 !important; } }
/* Page Le Fablab uniquement (fablab.html) : les deux photos de gauche (1 et 5) se partagent la hauteur 50/50 ; à droite, la photo 3 occupe toute la colonne 4, puis 2 (haut) et 4 (bas, hauteur double) sont empilées (colonnes 5-6) ; la case 6 est masquée. 6 demi-lignes = hauteur totale des 3 lignes d'origine. */
@media (min-width: 700px) {
  [data-espace="fablab"] .esp-gallery { grid-auto-rows: calc(clamp(5rem, 11vw, 9rem) / 2 - .35rem); }
  [data-espace="fablab"] .esp-gallery__1 { grid-area: 1 / 1 / 4 / 4; }
  [data-espace="fablab"] .esp-gallery__2 { grid-area: 1 / 5 / 3 / 7; }
  [data-espace="fablab"] .esp-gallery__3 { grid-area: 1 / 4 / 7 / 5; }
  [data-espace="fablab"] .esp-gallery__4 { grid-area: 3 / 5 / 7 / 7; }
  [data-espace="fablab"] .esp-gallery__5 { grid-area: 4 / 1 / 7 / 4; }
}

/* Réservation SuperSaaS */
.esp-booking { padding: var(--space-3); background: var(--c-white); border: 1px solid var(--c-border); border-top: 4px solid var(--c-magenta); border-radius: var(--radius-sm); max-width: 52rem; }
.esp-booking__group { margin: var(--space-3) 0 .5rem; font-size: 1.1rem; color: var(--c-blue-ink); }
.esp-booking__list, .esp-booking__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 var(--space-2); }
.esp-booking__sub { margin: var(--space-2) 0 0; font-size: .95rem; color: var(--c-slate); }
.esp-booking__status { margin: .8rem 0 0; padding: .7rem 1rem; background: #fdecf2; border-left: 4px solid var(--c-magenta); }

/* Profils : cartes et cadres vides */
.esp-profiles { list-style: none; margin: var(--space-3) 0; padding: 0; display: grid; gap: var(--space-3) var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .esp-profiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.esp-profile--empty { display: grid; justify-items: center; gap: .6rem; }
.esp-profile__photo { width: min(100%, 9rem); aspect-ratio: 1; border-radius: 50%; background: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 12px, rgba(255,255,255,0) 12px 24px), linear-gradient(150deg, #cfe6ea, #9ccbd3); border: 1px dashed rgba(56, 78, 91, .4); }
.esp-profile__line { display: block; width: 70%; height: .7rem; border-radius: 999px; background: #d6e3ea; }
.esp-profile__line--short { width: 45%; }
.profile-card { display: grid; justify-items: center; gap: .5rem; text-align: center; }
.profile-card__btn { display: grid; justify-items: center; gap: .5rem; padding: 0; border: 0; background: none; font: inherit; color: var(--c-blue-ink); cursor: pointer; }
.profile-card__photo { width: min(100%, 9rem); aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: linear-gradient(150deg, #cfe6ea, #9ccbd3); transition: transform .35s var(--ease); }
.profile-card__btn:hover .profile-card__photo, .profile-card__btn:focus-visible .profile-card__photo { transform: scale(1.04); }
.profile-card__btn:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.profile-card__name { font-weight: 700; font-size: 1.05rem; }
.profile-card__crafts { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.profile-dialog { width: min(42rem, 92vw); padding: 0; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-dialog::backdrop { background: rgba(40, 77, 99, .55); }
.profile-dialog__body { position: relative; display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-3) var(--space-3); }
@media (min-width: 600px) { .profile-dialog__body { grid-template-columns: 11rem 1fr; } }
.profile-dialog__photo { width: 11rem; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: linear-gradient(150deg, #cfe6ea, #9ccbd3); display: block; }
.profile-dialog__close { position: absolute; top: .5rem; right: .7rem; width: 2.75rem; height: 2.75rem; border: 0; background: none; font-size: 2rem; line-height: 1; color: var(--c-blue-ink); cursor: pointer; }
.profile-dialog h2 { margin: 0 0 .5rem; }
.profile-dialog__links { padding-left: 1.2rem; }

/* Annuaire */
.esp-dir { padding-top: var(--space-4); padding-bottom: var(--space-5); }
.esp-dir__intro { max-width: 44rem; }
.esp-dir__tools { display: grid; gap: var(--space-2); margin-bottom: var(--space-2); }
.esp-dir__tools input { width: 100%; max-width: 28rem; min-height: 2.9rem; padding: .6rem .9rem; border: 1px solid var(--c-blue-grey); border-radius: var(--radius-sm); font: inherit; }
.esp-dir__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-btn { min-height: 2.75rem; padding: .45rem 1.1rem; border: 1px solid var(--c-blue-grey); border-radius: var(--radius-pill); background: var(--c-white); color: var(--c-blue-ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--c-blue-ink); border-color: var(--c-blue-ink); color: #fff; }
.chip-btn:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.esp-dir__status { margin: 0 0 var(--space-2); color: var(--c-slate); font-size: .95rem; }
.esp-dir__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3) var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .esp-dir__grid, .esp-profiles--dir { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .esp-dir__grid, .esp-profiles--dir { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Autres espaces */
.esp-others { padding: var(--space-4) 0 var(--space-5); background: var(--esp-ink); color: #fff; }
.esp-others__t { margin: 0 0 var(--space-3); color: var(--esp-terra); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; }
.esp-others__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
@media (min-width: 800px) { .esp-others__list { grid-template-columns: repeat(3, 1fr); } }
.esp-others__list a { display: grid; gap: .3rem; height: 100%; padding: 1.2rem 1.3rem; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius-sm); color: #fff; text-decoration: none; transition: background .25s var(--ease), border-color .25s var(--ease); }
.esp-others__list a:hover, .esp-others__list a:focus-visible { background: rgba(255, 255, 255, .08); border-color: var(--esp-terra); }
.esp-others__list strong { font-size: 1.15rem; }
.esp-others__list span { color: #cfe0ea; font-size: .95rem; }
.esp-notfound { padding: var(--space-5) 0; }
@media (prefers-reduced-motion: reduce) { .profile-card__photo, .esp-others__list a { transition: none; } }

.profile-dialog .profile-card__crafts { justify-content: flex-start; margin: 0 0 .8rem; }

/* Réservation en ligne (agenda SuperSaaS) */
.esp-booking__live { margin: 0 0 var(--space-3); }
.esp-booking__hours { margin: 0 0 var(--space-1); font-weight: 700; }

/* Page Le Fablab (bandeau intégré, sans fil d'Ariane) : on réserve la place de l'en-tête fixe au-dessus du bandeau */
#espace-root[data-espace] .esp-hero { padding-top: calc(var(--header-h, 5rem) + clamp(2rem, 4vw, 3.5rem)); }

/* Venir à l'espace (page Salle) */
.esp-venir { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.esp-venir h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.esp-venir p { margin: 0; }
.esp-route { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; }
.esp-venir__map { position: relative; margin-top: var(--space-4); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-blue-grey); }
#espace-map { height: 20rem; }
.esp-venir__link { margin: var(--space-1) 0 0; }
@media (max-width: 640px) { .esp-venir { grid-template-columns: 1fr; } #espace-map { height: 16rem; } }

/* Réservation par agenda : tout sur une ligne (horaires à gauche, boutons à droite), sur toute la largeur ; en colonne sur mobile */
.esp-booking--row { max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.esp-booking--row .esp-booking__live { display: contents; }
.esp-booking--row .esp-booking__hours { flex: 1 1 22rem; margin: 0; }
.esp-booking--row .esp-booking__actions { margin: 0; flex: 0 0 auto; }
.esp-booking--row .esp-booking__status { flex: 1 1 100%; margin: 0; }

/* Suite 119 — fenêtre « Tarifs et conditions » */
.tarifs { border: 0; border-radius: var(--radius); padding: 0; width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); overflow: auto; color: var(--c-blue-ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.tarifs::backdrop { background: rgba(40, 77, 99, .55); }
.tarifs__body { padding: var(--space-3); }
.tarifs__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-2); }
.tarifs__head h2 { margin: 0; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-primary); }
.tarifs__close { flex: none; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--c-bg-light); color: var(--c-blue-ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tarifs__close:hover, .tarifs__close:focus-visible { background: var(--c-bg-soft); outline: 2px solid var(--c-blue-ink); }
.tarifs h3 { margin: 0 0 var(--space-1); }
.tarifs ul { margin: var(--space-2) 0 0; padding-left: 1.1rem; list-style: disc; }
.tarifs li::marker { color: var(--c-primary); }
.tarifs__note { font-size: .92rem; margin: var(--space-2) 0 0; }
.tarifs__actions { margin: var(--space-3) 0 0; }
/* Page Fablab : case 6 retirée de la galerie (toutes tailles d'écran) ; la photo 4 occupe sa place sur ordinateur. */
[data-espace="fablab"] .esp-gallery__6 { display: none; }
/* Page Fablab, mobile : 5 photos en 2 colonnes, la dernière occupe toute la largeur pour ne pas laisser de case vide. */
@media (max-width: 699px) { [data-espace="fablab"] .esp-gallery__5 { grid-column: 1 / 3 !important; } }
/* Page Artistes / artisan·e·s (sans fil d'Ariane) : l'en-tête fixe du site ne doit pas masquer la ligne orange « La Rampe · Fontenay-sous-Bois » */
.esp-hero--nocrumb { padding-top: calc(var(--header-h, 5rem) + clamp(1.4rem, 3vw, 2.6rem)); }

/* Suite 330 — page La salle Pagawy uniquement : 4 photos. Ordinateur : cuisine (paysage) | deux photos empilées au milieu (studio rouge, scène) | duo basket (portrait), même hauteur totale. Téléphone : cuisine pleine largeur, deux portraits côte à côte, scène pleine largeur. Les cases 5 et 6 (vides) sont masquées. */
.esp-gallery--salle .esp-gallery__5, .esp-gallery--salle .esp-gallery__6 { display: none; }
.esp-gallery--salle figure { min-width: 0; }
@media (min-width: 700px) {
  .esp-gallery--salle { display: grid; gap: .7rem; grid-template-columns: 1.333fr .75fr .75fr; grid-template-rows: 1fr 1fr; grid-auto-rows: auto; aspect-ratio: 2.83 / 1; }
  .esp-gallery--salle figure { aspect-ratio: auto; height: auto; min-height: 0; }
  .esp-gallery--salle .esp-gallery__1 { grid-area: 1 / 1 / 3 / 2; }
  .esp-gallery--salle .esp-gallery__2 { grid-area: 1 / 2 / 2 / 3; border-radius: .6rem; }
  .esp-gallery--salle .esp-gallery__3 { grid-area: 2 / 2 / 3 / 3; border-radius: .6rem; }
  .esp-gallery--salle .esp-gallery__4 { grid-area: 1 / 3 / 3 / 4; border-radius: .6rem 2.4rem .6rem .6rem; }
}
@media (max-width: 699px) {
  .esp-gallery--salle { grid-auto-rows: auto; }
  .esp-gallery--salle .esp-gallery__1 { grid-column: 1 / 3 !important; aspect-ratio: 4 / 3; }
  .esp-gallery--salle .esp-gallery__2 { order: 2; aspect-ratio: .75; }
  .esp-gallery--salle .esp-gallery__4 { order: 3; aspect-ratio: .75; }
  .esp-gallery--salle .esp-gallery__3 { order: 4; grid-column: 1 / 3 !important; aspect-ratio: 4 / 3; }
}
}
