/* =========================================================
   PAGE PROJET — Logos & chartes graphiques
   ========================================================= */

/* ---------- En-tête ---------- */
.case-hero {
  padding: clamp(8rem, 14vw, 11rem) var(--gutter) 3rem;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(251, 79, 12, .18), transparent 70%),
    var(--bg);
}
.back {
  display: table;
  margin-bottom: 2rem;
  font-size: .9rem;
  color: var(--muted);
  transition: color .3s, transform .3s var(--ease);
}
.back:hover { color: var(--accent); transform: translateX(-4px); }
.case-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: -.01em;
  margin: 1.2rem 0 1.5rem;
}
.case-hero__title em { font-style: normal; color: var(--accent); }
.case-hero__intro { max-width: 640px; color: #c3cedb; font-size: clamp(1rem, 1.4vw, 1.12rem); }

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}
.case-meta div { padding: 1.2rem 1rem 0 0; }
.case-meta dt { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.case-meta dd { font-weight: 500; }

/* ---------- Mur de logos ---------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 2rem var(--gutter) 4rem;
}
.wall-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  padding: 1rem 1rem 1.8rem;
  background: #fff;
  border-radius: var(--radius);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: transform .5s var(--ease), outline-color .3s, opacity 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.wall-tile img { width: 88%; height: auto; max-height: 72%; object-fit: contain; }
.wall-tile span {
  position: absolute;
  left: 1rem; bottom: .8rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: #8a94a3;
}
.wall-tile:hover { transform: translateY(-6px); outline-color: var(--accent); transition-delay: 0s; }

/* ---------- Barre de navigation des marques ---------- */
.brand-nav {
  position: sticky;
  top: 62px;
  z-index: 50;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: .8rem var(--gutter);
  background: rgba(7, 20, 35, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
}
.brand-nav::-webkit-scrollbar { display: none; }
.brand-nav a {
  flex-shrink: 0;
  padding: .45rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all .3s var(--ease);
}
.brand-nav a:hover { color: var(--text); }
.brand-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- Fiche marque ---------- */
.brand {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.brand:nth-child(even) { background: var(--bg-2); }

.brand__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.4rem; margin-bottom: 2.5rem; }
.brand__num { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); width: 100%; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
}
.brand__sector {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .82rem;
  color: #c3cedb;
}
.brand__sector::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }

.brand__intro { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.brand__text p { color: #c3cedb; font-size: 1.05rem; line-height: 1.75; }
.keywords { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.keywords li {
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .82rem;
  background: rgba(251, 79, 12, .12);
  color: #ffb08a;
}

.block { margin-top: clamp(3rem, 6vw, 4.5rem); }
.label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.label span { letter-spacing: 0; text-transform: none; color: rgba(143, 160, 181, .6); }
.brand__text .label { margin-bottom: .8rem; }

/* ---------- Tuiles (fonds de présentation) ---------- */
.tile {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem 1rem 2.2rem;
  aspect-ratio: 16 / 10;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.tile img { width: 86%; height: auto; max-height: 68%; object-fit: contain; }
.tile figcaption {
  position: absolute;
  left: 1rem; bottom: .85rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: #7b8594;
}
.tile--hero { aspect-ratio: 2 / 1; padding: 1.5rem; box-shadow: 0 40px 60px -35px rgba(0, 0, 0, .7); }
.tile--hero img { width: 88%; max-height: 78%; }
.tile--dark { background: var(--brand-dark); }
.tile--dark figcaption { color: rgba(255, 255, 255, .6); }
.tile--grey { background: #eef0f3; }

img.is-white { filter: brightness(0) invert(1); }
img.is-black { filter: brightness(0); }

.variants { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.icon-crop { display: block; height: 52%; aspect-ratio: var(--ratio); overflow: hidden; }
.icon-crop img { height: 100%; width: auto; max-width: none; max-height: none; object-fit: initial; }

/* ---------- Palette ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1rem; }
.swatch {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s;
}
.swatch:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, .25); }
.swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.swatch__color {
  position: relative;
  height: 130px;
  background: var(--sw);
}
.swatch__color em {
  position: absolute;
  top: .8rem; left: .9rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.swatch--light .swatch__color { box-shadow: inset 0 -1px 0 var(--line); }
.swatch--light .swatch__color em { color: rgba(10, 35, 61, .7); }
.swatch__info { display: flex; flex-direction: column; gap: .15rem; padding: 1rem .95rem 1.1rem; }
.swatch__info strong { font-size: .98rem; margin-bottom: .2rem; }
.swatch__info code { font-family: var(--font-mono); color: var(--accent); font-size: .9rem; margin-bottom: .3rem; }
.swatch__info small { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }

/* ---------- Typographie ---------- */
.typo {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #fff;
  color: #0f172a;
  border-radius: var(--radius);
}
.typo__specimen { display: flex; align-items: center; gap: 1.5rem; }
.typo__aa { font-size: clamp(5rem, 10vw, 8rem); line-height: 1; color: var(--brand); }
.typo__name { font-weight: 700; font-size: 1.3rem; margin-bottom: .4rem; }
.typo__chars { font-size: .9rem; color: #5b6472; line-height: 1.5; word-break: break-word; }
.typo__scale p { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 0; border-bottom: 1px solid #e6e9ee; }
.typo__scale p:last-child { border-bottom: 0; }
.typo__scale small { font-family: var(--font-mono); font-size: .66rem; color: #8a94a3; text-transform: uppercase; letter-spacing: .08em; }
.typo__scale span { line-height: 1.25; color: #0f172a; }

/* ---------- Règles d'usage ---------- */
.rules { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; }
.tile--clear { aspect-ratio: auto; padding: 2rem 1.5rem 4rem; }
.tile--clear figcaption { right: 1rem; line-height: 1.5; }
.tile--clear figcaption b { color: var(--accent); }
.clearspace {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 420px);
  padding: 26px;
  border: 1.5px dashed var(--accent);
  background: repeating-linear-gradient(45deg, rgba(251, 79, 12, .07) 0 6px, transparent 6px 12px);
}
.clearspace img { width: 100%; height: auto; max-height: 130px; background: #fff; outline: 1px solid rgba(15, 23, 42, .12); }
.x { position: absolute; font-family: var(--font-mono); font-style: normal; font-size: .75rem; font-weight: 500; color: var(--accent); }
.x--t { top: 4px; left: 50%; transform: translateX(-50%); }
.x--l { left: 8px; top: 50%; transform: translateY(-50%); }

.specs { display: grid; gap: 1rem; }
.spec {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.spec span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spec strong { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin: .25rem 0; }
.spec small { color: var(--muted); font-size: .82rem; }

.donts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.dont::after {
  content: "✕";
  position: absolute;
  top: .7rem; right: .7rem;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #e5383b;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}
.dont figcaption { color: #c62828; }
.dont--busy { background: linear-gradient(120deg, #ffb347, #ff5e62 30%, #6a82fb 60%, #22c1c3 90%); }
.dont--busy figcaption { color: #fff; }

/* ---------- Mise en situation ---------- */
.mockups { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: center; }

.mock-browser { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .7); }
.mock-browser__bar { display: flex; align-items: center; gap: 6px; padding: .6rem .9rem; background: #eceff3; }
.mock-browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd5dd; }
.mock-browser__bar span {
  flex: 1;
  margin-left: .8rem;
  padding: .2rem .8rem;
  border-radius: 6px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: #7b8594;
}
.mock-header { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-bottom: 1px solid #eceff3; }
.mock-header img { height: 30px; width: auto; max-width: 42%; object-fit: contain; object-position: left; }
.mock-header nav { display: flex; gap: .6rem; margin-left: auto; }
.mock-header nav span { width: 34px; height: 6px; border-radius: 3px; background: #dfe3e8; }
.mock-header b { padding: .45rem .8rem; border-radius: 6px; background: var(--brand); color: #fff; font-size: .7rem; white-space: nowrap; }
.mock-hero { padding: 2rem 1.4rem 2.2rem; background: var(--brand-dark); color: #fff; }
.mock-hero p { font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.2; margin-bottom: 1.2rem; }
.mock-hero span { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .25); width: 70%; margin-bottom: .5rem; }
.mock-hero span + span { width: 45%; }

.mock-cards { position: relative; display: grid; gap: 1.2rem; width: min(100%, 340px); justify-self: center; }
.card {
  display: grid;
  place-items: center;
  aspect-ratio: 85 / 55;
  border-radius: 10px;
  box-shadow: 0 30px 40px -25px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.card--front { background: #fff; transform: rotate(-3deg); }
.card--front img { width: 82%; height: auto; max-height: 60%; object-fit: contain; }
.card--back {
  place-items: stretch;
  align-content: space-between;
  padding: 1.2rem 1.3rem;
  background: var(--brand-dark);
  color: #fff;
  transform: rotate(2deg) translateX(6%);
}
.card--back img { height: 26px; width: auto; max-width: 60%; object-fit: contain; object-position: left; }
.card--back p { font-size: .75rem; line-height: 1.5; opacity: .9; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 2rem;
  z-index: 200;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  background: #fff;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: .82rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: all .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer de la page projet */
.page-projet .footer__cta { margin-bottom: 3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .case-meta { grid-template-columns: 1fr 1fr; }
  .brand__intro, .rules, .mockups, .typo { grid-template-columns: 1fr; }
  .variants, .donts { grid-template-columns: repeat(2, 1fr); }
  .mock-cards { grid-template-columns: 1fr 1fr; }
  .card--back { transform: rotate(2deg); }
}
@media (max-width: 560px) {
  .brand-nav { top: 58px; }
  .tile figcaption { font-size: .6rem; left: .7rem; bottom: .6rem; }
  .typo__specimen { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .mock-header nav { display: none; }
  .mock-cards { grid-template-columns: 1fr; }
  .tile--clear { padding: 2rem 1rem 5rem; }
}

/* Logo à fond plein : présenté sur un cartouche blanc */
.cartouche { display: grid; place-items: center; padding: 6% 8%; max-width: 82%; background: #fff; border-radius: 8px; }
.cartouche img { width: 100%; height: auto; max-height: 90px; object-fit: contain; }
.card--back .cartouche { justify-self: start; padding: .35rem .6rem; max-width: 65%; border-radius: 5px; }
.card--back .cartouche img { height: 22px; max-height: none; width: auto; }
img.is-grey { filter: grayscale(1) contrast(1.15); }

/* ---------- Contexte / défi / approche ---------- */
.case-brief {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem var(--gutter) 3rem;
}
.case-brief article {
  padding: 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.case-brief__num { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.case-brief h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin: .6rem 0 .6rem; }
.case-brief p { color: #c3cedb; font-size: .95rem; }
.wall-title {
  padding: 0 var(--gutter);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.logo-wall { padding-top: 1.2rem; }
@media (max-width: 900px) { .case-brief { grid-template-columns: 1fr; } }
@media (min-width: 1300px) { .logo-wall { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 700px) { .logo-wall { grid-template-columns: repeat(2, 1fr); } }
