/* Le Labo - extension de la charte louispierre.fr */

:root {
  --labo-burgundy: #8f2630;
  --labo-burgundy-dark: #6f1821;
  --labo-burgundy-soft: #efe2df;
  --labo-green: #557e5e;
  --labo-green-soft: #e4ece3;
}

.labo-page .header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.labo-hero {
  padding-bottom: clamp(4.75rem, 9vw, 7rem);
}

.labo-hero-grid {
  align-items: center;
}

.labo-hero h1 {
  max-width: 13ch;
}

.labo-hero .hero-subtitle {
  max-width: 62ch;
}

.labo-system-card {
  overflow: hidden;
}

.labo-system-card::after {
  content: '';
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 11rem;
  height: 11rem;
  border-radius: 999px;
  background: rgba(183, 122, 69, .11);
  pointer-events: none;
}

.labo-system-note {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .25rem;
  margin-top: 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(183, 122, 69, .24);
  border-radius: var(--radius-sm);
  background: rgba(183, 122, 69, .08);
}

.labo-system-note strong {
  color: var(--color-blue-night);
  font-family: var(--font-heading);
  font-size: 1.08rem;
  line-height: 1.3;
}

.labo-system-note span {
  color: var(--color-text-secondary);
  font-size: .84rem;
  line-height: 1.55;
}

/* Projects */

.labo-projects {
  background: linear-gradient(180deg, rgba(251, 250, 247, .72), rgba(246, 243, 236, .72));
}

.labo-project-list {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.75rem);
}

.labo-project-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(251, 250, 247, .96);
  box-shadow: 0 24px 65px rgba(23, 32, 51, .07);
}

.labo-project-visual {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--color-border);
}

.labo-project-visual::before,
.labo-project-visual::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.labo-project-visual::before {
  width: 18rem;
  height: 18rem;
  right: -7rem;
  top: -8rem;
  border: 1px solid rgba(183, 122, 69, .28);
}

.labo-project-visual::after {
  width: 12rem;
  height: 12rem;
  left: -5rem;
  bottom: -5rem;
  background: rgba(183, 122, 69, .09);
}

.project-visual-label {
  position: absolute;
  z-index: 8;
  top: 1.25rem;
  left: 1.25rem;
  padding: .45rem .7rem;
  border: 1px solid rgba(183, 122, 69, .30);
  border-radius: 999px;
  color: var(--color-copper);
  background: rgba(255, 253, 248, .9);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.visual-project-logo {
  position: absolute;
  z-index: 7;
  object-fit: contain;
}

.visual-caption {
  position: absolute;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}

.visual-caption span {
  padding: .42rem .62rem;
  border: 1px solid rgba(255, 253, 248, .55);
  border-radius: 999px;
  color: var(--color-white-warm);
  background: rgba(15, 39, 66, .75);
  font-size: .65rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Livrilo visual */

.livrilo-visual {
  background:
    radial-gradient(circle at 18% 22%, rgba(143, 38, 48, .16), transparent 29%),
    linear-gradient(145deg, rgba(143, 38, 48, .06), rgba(255, 253, 248, .98));
}

.livrilo-visual::before {
  border-color: rgba(143, 38, 48, .22);
}

.livrilo-visual::after {
  background: rgba(143, 38, 48, .08);
}

.livrilo-visual-logo {
  top: 2.5rem;
  right: 2rem;
  width: 5.2rem;
  height: 6.3rem;
  filter: drop-shadow(0 12px 20px rgba(111, 24, 33, .15));
}

.livrilo-screens {
  position: relative;
  z-index: 3;
  width: min(92%, 35rem);
  height: 28rem;
}

.app-shot {
  position: absolute;
  overflow: hidden;
  width: 13.2rem;
  margin: 0;
  padding: .42rem;
  border: 1px solid rgba(15, 39, 66, .28);
  border-radius: 2.05rem;
  background: var(--color-blue-night);
  box-shadow: 0 28px 55px rgba(23, 32, 51, .18);
}

.app-shot::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: .72rem;
  left: 50%;
  width: 3.5rem;
  height: .85rem;
  border-radius: 999px;
  background: var(--color-blue-night);
  transform: translateX(-50%);
}

.app-shot img {
  width: 100%;
  height: auto;
  border-radius: 1.68rem;
}

.app-shot-home {
  left: 7%;
  top: 3.4rem;
  transform: rotate(-5deg);
}

.app-shot-library {
  z-index: 2;
  right: 7%;
  top: 1rem;
  transform: rotate(4deg);
}

.visual-caption-livrilo {
  left: 1.4rem;
  bottom: 1.4rem;
}

/* Carmino visual */

.carmino-visual {
  position: relative;
  padding: 0;
  background: var(--color-blue-night);
}

.carmino-visual::before {
  z-index: 2;
  background: linear-gradient(180deg, rgba(15, 39, 66, .10), transparent 30%, rgba(15, 39, 66, .16));
  pointer-events: none;
}

.carmino-visual::after {
  display: none;
}

.carmino-photo-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.carmino-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.visual-caption-carmino {
  right: 1.4rem;
  bottom: 1.4rem;
  left: auto;
  justify-content: flex-end;
}

.carmino-visual .project-visual-label {
  z-index: 4;
  color: var(--color-blue-night);
  border-color: rgba(255, 253, 248, .72);
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 28px rgba(15, 39, 66, .14);
  backdrop-filter: blur(10px);
}

/* Project copy */

.labo-project-content {
  display: flex;
  flex-direction: column;
  padding: clamp(1.7rem, 5vw, 3.1rem);
}

.project-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-heading .eyebrow {
  margin-bottom: .15rem;
}

.project-heading h3 {
  font-size: clamp(2.55rem, 6vw, 4.55rem);
  line-height: .95;
}

.project-heading-brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white-warm);
  box-shadow: 0 10px 25px rgba(23, 32, 51, .08);
}

.project-heading-brand-livrilo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: var(--radius-md);
}

.project-heading-brand-livrilo img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.project-heading-brand-carmino {
  width: 4.25rem;
  height: 4.25rem;
  padding: .68rem;
  border-radius: var(--radius-md);
}

.project-heading-brand-carmino img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-lead {
  margin-top: 1.55rem;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.32;
}

.project-story {
  margin-top: 1.35rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(183, 122, 69, .55);
}

.project-story p {
  color: var(--color-text-secondary);
  font-size: .98rem;
  line-height: 1.72;
}

.project-facts {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.7rem;
  padding-top: 1.55rem;
  border-top: 1px solid var(--color-border);
}

.project-facts span,
.project-reflection span {
  display: block;
  margin-bottom: .36rem;
  color: var(--color-copper);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.project-facts p {
  color: var(--color-text-secondary);
  font-size: .9rem;
  line-height: 1.62;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.55rem;
}

.project-tags span {
  padding: .42rem .7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-secondary);
  background: rgba(255, 253, 248, .7);
  font-size: .74rem;
  font-weight: 700;
}

.project-reflection {
  margin-top: 1.55rem;
  padding: 1.05rem 1.15rem;
  border-left: 3px solid var(--color-copper);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(183, 122, 69, .08);
}

.project-reflection strong {
  display: block;
  color: var(--color-blue-night);
  font-size: .98rem;
  line-height: 1.52;
}

.project-note {
  margin-top: 1.3rem;
  color: var(--color-text-secondary);
  font-size: .82rem;
  line-height: 1.62;
}

.project-status {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: auto;
  padding-top: 1.7rem;
  color: var(--labo-green);
  font-size: .78rem;
  font-weight: 700;
}

.project-status i {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 .28rem rgba(85, 126, 94, .13);
}

.project-status-dormant {
  color: var(--color-copper);
}

.project-status-dormant i {
  box-shadow: 0 0 0 .28rem rgba(183, 122, 69, .13);
}

/* Exploration territories */

.labo-territories h2 {
  max-width: 17ch;
}

.labo-territories .section-intro {
  max-width: 68ch;
}

.labo-territories-grid {
  grid-template-columns: 1fr;
}

.labo-territories-grid .card {
  position: relative;
  overflow: hidden;
}

.labo-territories-grid .card::after {
  content: '';
  position: absolute;
  right: -2.4rem;
  bottom: -2.4rem;
  width: 5.8rem;
  height: 5.8rem;
  border: 1px solid rgba(183, 122, 69, .16);
  border-radius: 999px;
}

/* Method and final note */

.labo-method .timeline-content p {
  max-width: 24ch;
}

.labo-open {
  padding-top: clamp(4rem, 8vw, 6rem);
  padding-bottom: clamp(4.75rem, 9vw, 7rem);
}

.labo-open-card {
  display: grid;
  gap: 2rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid rgba(183, 122, 69, .42);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(183, 122, 69, .16), transparent 20rem),
    rgba(251, 250, 247, .95);
  box-shadow: 0 24px 65px rgba(23, 32, 51, .07);
}

.labo-open-card h2 {
  max-width: 15ch;
}

.labo-open-copy p {
  color: var(--color-text-secondary);
  font-size: clamp(1rem, 2vw, 1.11rem);
  line-height: 1.72;
}

/* Text alignment */

.labo-page .hero-subtitle,
.labo-page .section-subtitle,
.labo-page .section-intro,
.project-story p,
.project-facts p,
.project-reflection strong,
.project-note,
.labo-territories-grid .card p,
.labo-method .timeline-content p,
.labo-open-copy p {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}


/* Les blocs en trois colonnes restent alignés à gauche :
   la justification crée trop d'espaces sur une largeur réduite. */
.project-facts p {
  text-align: left;
  text-align-last: auto;
  hyphens: none;
  -webkit-hyphens: none;
}

/* Responsive */

@media (min-width: 700px) {
  .labo-territories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-facts-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.75rem;
  }

  .labo-open-card {
    grid-template-columns: 1.05fr .95fr;
    align-items: end;
  }
}

@media (min-width: 900px) {
  .labo-project-card {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    min-height: 49rem;
  }

  .labo-project-card-reverse .labo-project-visual {
    order: 2;
  }

  .labo-project-card-reverse .labo-project-content {
    order: 1;
  }

  .labo-project-visual {
    min-height: 100%;
    border-right: 1px solid var(--color-border);
    border-bottom: 0;
  }

  .labo-project-card-reverse .labo-project-visual {
    border-right: 0;
    border-left: 1px solid var(--color-border);
  }
}

@media (min-width: 1080px) {
  .labo-territories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .labo-territories-grid .card {
    min-height: 17.5rem;
  }
}

@media (max-width: 899px) {
  .labo-page .header-actions {
    display: none;
  }

  .labo-project-card {
    min-height: 0;
  }
}

@media (max-width: 699px) {
  .labo-hero h1 {
    max-width: 11ch;
  }

  .labo-project-visual {
    min-height: 28rem;
  }

  .livrilo-screens {
    width: 100%;
    height: 25rem;
    transform: scale(.9);
  }

  .app-shot {
    width: 11.5rem;
  }

  .app-shot-home {
    left: 1%;
    top: 4rem;
  }

  .app-shot-library {
    right: 1%;
  }

  .livrilo-visual-logo {
    right: 1rem;
    width: 4.4rem;
    height: 5.4rem;
  }

  .visual-caption-livrilo {
    right: 1rem;
    left: 1rem;
    justify-content: center;
  }

  .project-heading {
    align-items: flex-start;
  }

  .project-heading-brand-carmino {
    width: 3.75rem;
    height: 3.75rem;
  }
}

@media (max-width: 430px) {
  .labo-project-visual {
    min-height: 24.5rem;
  }

  .livrilo-screens {
    height: 22rem;
    transform: scale(.78);
  }

  .livrilo-visual-logo {
    width: 3.7rem;
    height: 4.6rem;
  }

  .visual-caption {
    display: none;
  }

  .visual-caption-carmino {
    right: .85rem;
    bottom: .85rem;
    left: auto;
    display: flex;
    justify-content: flex-end;
    gap: .32rem;
  }

  .visual-caption-carmino span {
    padding: .34rem .48rem;
    font-size: .57rem;
  }

  .carmino-photo-frame img {
    object-position: 56% center;
  }

  .project-heading-brand-livrilo {
    width: 3.65rem;
    height: 3.65rem;
  }

  .project-heading h3 {
    font-size: 2.85rem;
  }
}
