/* ═══════════════════════════════════════════════════════════════════
   STYLES PROPRES A REALISATIONS.html
   ───────────────────────────────────────────────────────────────────
   Ces regles etaient ecrites dans la page. Sorties ici pour etre
   trouvables : 19 Ko de CSS noye dans du HTML ne se relit pas.

   ⚠️ LA POSITION DU <link> DANS LA PAGE EST SIGNIFIANTE. Cette feuille
   est chargee AVANT mobile.css, exactement comme l etaient les blocs
   d origine. Deplacer le lien change qui gagne dans la cascade.
   ═══════════════════════════════════════════════════════════════════ */

/* ── bloc 1/1 de realisations.html ── */
body { background: #fff !important; overflow-x: hidden; }

    .real-bg {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: -1;
    }
    .real-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }
    main.real-main {
      padding-top: clamp(130px, 18vw, 170px);
      padding-bottom: clamp(100px, 14vw, 160px);
    }

    /* ── CONTAINER ── */
    .real-inner {
      position: relative;
      z-index: 1;
    }

    /* ── HEADER ── */
    .real-head {
      text-align: center;
      max-width: 680px;
      margin: 0 auto 52px;
    }
    .real-head h1 {
      font-size: clamp(2rem, 5vw, 3rem);
      font-weight: 600;
      color: var(--ink);
      line-height: 1.15;
      margin-bottom: 16px;
    }
    .real-head h1 em {
      color: var(--red);
      font-style: italic;
    }
    .real-head p {
      font-size: .95rem;
      color: var(--muted);
      line-height: 1.7;
    }

    /* ── STATS BAR ── */
    .real-stats {
      display: flex;
      max-width: 520px;
      margin: 0 auto 48px;
      background: #faf8f5;
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid #e6e1d8;
    }
    .real-stat {
      flex: 1;
      text-align: center;
      padding: 18px 8px;
      border-right: 1px solid #e6e1d8;
    }
    .real-stat:last-child { border-right: none; }
    .real-stat__num {
      display: block;
      font-size: 1.4rem;
      font-weight: 600;
      color: var(--ink);
      line-height: 1;
      margin-bottom: 4px;
    }
    .real-stat__label {
      display: block;
      font-size: .62rem;
      font-weight: 500;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    /* ── FILTERS ── */
    .proj-filters {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: nowrap;
      gap: 8px;
      margin-bottom: 40px;
    }
    .proj-filter {
      padding: 8px 20px;
      min-height: 38px;
      border-radius: 4px;
      border: 1.5px solid #e6e1d8;
      background: transparent;
      font-size: .78rem;
      font-weight: 500;
      color: #6e6b66;
      cursor: pointer;
      transition: all .2s;
      white-space: nowrap;
      font-family: inherit;
    }
    .proj-filter:hover {
      border-color: var(--red);
      color: var(--red);
    }
    .proj-filter.active {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }
    @media (max-width: 480px) {
      .proj-filters { gap: 6px; }
      .proj-filter { padding: 6px 12px; font-size: .7rem; min-height: 32px; }
    }

    /* ── CARD GRID ── */
    .proj-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      max-width: 1100px;
      margin: 0 auto;
    }
    .proj-card.is-page-hidden { display: none; }

    /* ── NAV ARROWS ── */
    .proj-nav {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 12px;
      margin-top: 36px;
    }
    .proj-nav__btn {
      width: 46px; height: 46px;
      border-radius: 50%;
      border: 1.5px solid #e6e1d8;
      background: #fff;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: #413f3c;
      transition: all .2s;
      font-family: inherit;
    }
    .proj-nav__btn:hover:not(:disabled) {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }
    .proj-nav__btn:disabled { opacity: .3; cursor: not-allowed; }
    .proj-nav__page {
      font-size: .8rem;
      font-weight: 600;
      color: var(--muted);
      min-width: 60px;
      text-align: center;
    }

    /* ── CARD ── */
    .proj-card {
      background: #fff;
      border: 1px solid #e6e1d8;
      border-radius: 4px;
      overflow: hidden;
      cursor: pointer;
      transition: border-color .3s, box-shadow .3s, transform .3s;
      display: flex;
      flex-direction: column;
    }
    .proj-card:hover {
      border-color: #d5d0c8;
      box-shadow: 0 8px 40px rgba(0,0,0,.1), 0 2px 12px rgba(0,0,0,.06);
      transform: translateY(-4px);
    }
    .proj-card.is-hidden { display: none; }

    /* Thumbnail */
    .proj-card__thumb {
      height: 200px;
      position: relative;
      overflow: hidden;
      flex-shrink: 0;
      background: #f0ede7;
    }

    /* Iframe preview */
    .proj-card__iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 1280px;
      height: 900px;
      border: none;
      pointer-events: none;
      background: white;
      transform-origin: top left;
    }
    @media (max-width: 700px) {
      .proj-card__iframe { width: 390px; height: 600px; }
    }

    /* ═══════════════════════════════════════
       PROJECT MODAL — redesign professionnel
       ═══════════════════════════════════════ */
    #modal.modal { padding: 24px; }
    #modal .modal__overlay {
      background: rgba(36, 38, 40, .55);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .pm-box {
      position: relative;
      width: 100%;
      max-width: 720px;
      max-height: 92vh;
      background: #fff;
      border-radius: 5px;
      overflow: hidden;
      padding: 0 !important;
      text-align: left !important;
      box-shadow: 0 40px 90px -20px rgba(36, 38, 40, .5), 0 0 0 1px rgba(36, 38, 40, .04);
      display: flex;
      flex-direction: column;
      animation: pmIn .42s cubic-bezier(.22, 1, .36, 1);
    }
    @keyframes pmIn {
      from { opacity: 0; transform: translateY(26px) scale(.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ── HERO ── */
    .pm-hero {
      position: relative;
      height: 300px;
      flex-shrink: 0;
      overflow: hidden;
      background: #242628;
    }
    .pm-hero__media { position: absolute; inset: 0; }
    .pm-hero__media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      display: block;
      animation: pmZoom 16s ease-out forwards;
    }
    @keyframes pmZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
    .pm-hero__media iframe {
      position: absolute;
      top: 0; left: 0;
      width: 1280px; height: 900px;
      border: none;
      pointer-events: none;
      background: #fff;
      transform-origin: top left;
    }
    .pm-hero__grad {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: linear-gradient(180deg,
        rgba(36, 38, 40, .35) 0%,
        rgba(36, 38, 40, 0) 28%,
        rgba(36, 38, 40, 0) 52%,
        rgba(36, 38, 40, .88) 100%);
    }
    .pm-hero__tag {
      position: absolute;
      top: 18px; left: 20px;
      z-index: 3;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      background: var(--red);
      color: #fff;
      font-size: .66rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .08em;
      border-radius: 4px;
      box-shadow: 0 6px 18px rgba(180, 24, 36, .45);
    }
    .pm-hero__caption {
      position: absolute;
      left: 24px; right: 24px; bottom: 20px;
      z-index: 3;
    }
    .pm-hero__caption h2 {
      color: #fff;
      font-size: 1.75rem;
      font-weight: 600;
      line-height: 1.15;
      margin: 0;
      text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
    }

    /* ── CLOSE ── */
    #modal .modal__close {
      position: absolute;
      top: 16px; right: 16px;
      width: 38px; height: 38px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .92);
      backdrop-filter: blur(6px);
      color: #242628;
      z-index: 5;
      box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
      transition: background .2s, color .2s, transform .3s;
    }
    #modal .modal__close:hover {
      background: var(--red);
      color: #fff;
      transform: rotate(90deg);
    }

    /* ── BODY ── */
    .pm-body {
      padding: 24px 28px 28px;
      overflow-y: auto;
    }
    .pm-desc {
      font-size: .92rem;
      color: #5c5a56;
      line-height: 1.65;
      margin: 0 0 22px;
    }

    /* info chips */
    .pm-info {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 24px;
    }
    .pm-chip {
      flex: 1;
      min-width: 150px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: #faf8f5;
      border: 1px solid #ece8e1;
      border-radius: 3px;
    }
    .pm-chip__ico {
      width: 38px; height: 38px;
      flex-shrink: 0;
      border-radius: 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(180, 24, 36, .1);
      color: var(--red);
    }
    .pm-chip__txt { display: flex; flex-direction: column; line-height: 1.25; }
    .pm-chip__label {
      font-size: .6rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .07em;
      color: #a6a19a;
    }
    .pm-chip__val { font-size: .92rem; font-weight: 600; color: #242628; }

    /* actions */
    .pm-actions { display: flex; gap: 12px; }
    .pm-actions .btn { flex: 1; justify-content: center; }
    /* Overlay transparent pour garantir le clic sur toute la thumbnail */
    .proj-card__thumb::before {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 2;
    }

    /* Card body */
    .proj-card__body {
      padding: 10px 14px 12px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }
    .proj-card__cat {
      display: inline-block;
      font-size: .58rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: #6e6b66;
      background: #f0ede7;
      border: 1px solid #e6e1d8;
      padding: 2px 8px;
      border-radius: 4px;
      margin-bottom: 5px;
    }
    .proj-card__name {
      font-size: .88rem;
      font-weight: 600;
      color: var(--ink);
      margin-bottom: 2px;
      line-height: 1.25;
    }
    .proj-card__sub {
      font-size: .7rem;
      color: var(--muted);
      margin-bottom: auto;
      padding-bottom: 8px;
    }
    .proj-card__footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 8px;
      border-top: 1px solid #f0ede7;
      margin-top: 8px;
    }
    .proj-card__stat {
      font-size: .72rem;
      font-weight: 600;
      color: var(--red);
    }
    .proj-card__arrow {
      width: 26px; height: 26px;
      border-radius: 50%;
      border: 1.5px solid #e6e1d8;
      display: flex; align-items: center; justify-content: center;
      color: #a6a19a;
      transition: all .2s;
      flex-shrink: 0;
    }
    .proj-card:hover .proj-card__arrow {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }

    /* ── CTA ── */
    .real-cta {
      text-align: center;
      margin-top: 56px;
    }
    .real-cta__sub {
      font-size: .85rem;
      color: var(--muted);
      margin-top: 14px;
    }

    /* ── MOBILE ── */
    @media (max-width: 700px) {
      .proj-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
      .proj-card { border-radius: 3px; }
      .proj-card__thumb { height: 110px; }
      .proj-card__body { padding: 7px 9px 9px; }
      .proj-card__cat { font-size: .52rem; padding: 2px 6px; margin-bottom: 3px; }
      .proj-card__name { font-size: .75rem; margin-bottom: 1px; }
      .proj-card__sub { font-size: .6rem; padding-bottom: 5px; }
      .proj-card__stat { font-size: .6rem; }
      .proj-card__arrow { width: 22px; height: 22px; }
      .proj-card__footer { margin-top: 6px; padding-top: 6px; }
    }
    @media (max-width: 400px) {
      .proj-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
      .proj-card__thumb { height: 90px; }
      .proj-card__body { padding: 5px 7px 7px; }
      .proj-card__name { font-size: .68rem; }
      .proj-card__sub { font-size: .56rem; }
    }

    @media (max-width: 700px) {
      .real-stats { max-width: 100%; margin-bottom: 32px; }
      .real-stat { padding: 12px 4px; }
      .real-stat__num { font-size: 1rem; }
      .real-stat__label { font-size: .52rem; }
    }

    /* ── STATS 2×2 very small ── */
    @media (max-width: 380px) {
      .real-stats { flex-wrap: wrap; }
      .real-stat { flex: 0 0 50%; border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.07); }
      .real-stat:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.07) !important; }
      .real-stat:nth-last-child(-n+2) { border-bottom: none; }
    }

    /* ── MODAL MOBILE — projet detail ── */
    @media (max-width: 700px) {
      #modal.modal { padding: 0; align-items: flex-end; }
      .pm-box {
        max-width: 100%;
        max-height: 94vh;
        border-radius: 5px 8px 0 0;
      }
      .pm-hero { height: 215px; }
      .pm-hero__caption { left: 18px; right: 18px; bottom: 16px; }
      .pm-hero__caption h2 { font-size: 1.3rem; }
      .pm-hero__tag { top: 14px; left: 16px; font-size: .6rem; padding: 5px 12px; }
      #modal .modal__close { top: 12px; right: 12px; width: 34px; height: 34px; }
      .pm-body { padding: 18px 18px 24px; }
      .pm-desc { font-size: .85rem; margin-bottom: 18px; line-height: 1.55; }
      .pm-info { gap: 8px; margin-bottom: 20px; }
      .pm-chip { min-width: calc(50% - 4px); padding: 10px 12px; gap: 10px; }
      .pm-chip__ico { width: 32px; height: 32px; border-radius: 3px; }
      .pm-chip__val { font-size: .82rem; }
      .pm-actions { flex-direction: column; }
    }

    /* Very small phones */
    @media (max-width: 400px) {
      .pm-hero { height: 175px; }
      .pm-hero__caption h2 { font-size: 1.12rem; }
      .pm-desc { font-size: .8rem; }
    }

    /* ── CARD STACK ── */
    .cs-wrap {
      position: relative;
      margin: 0 auto;
      padding-bottom: 28px;
      margin-bottom: -12px;
    }
    .cs-stage {
      position: relative;
      width: 100%;
      height: 400px;
      perspective: 1100px;
      overflow: visible;
      touch-action: pan-y;    /* scroll vertical = browser / horizontal = JS */
      cursor: grab;
    }
    .cs-stage:active { cursor: grabbing; }
    /* outer: porte le transform 3D — PAS de overflow/border-radius ici */
    .cs-card {
      position: absolute;
      bottom: 0;
      left: 50%;
      cursor: pointer;
      transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
      will-change: transform;
      user-select: none;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    .cs-card__inner {
      width: 100%;
      height: 100%;
      border-radius: 4px;
      overflow: hidden;
      position: relative;
      box-shadow: 0 12px 40px rgba(0,0,0,.18);
      transition: box-shadow .35s ease;
      background: #fff;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      display: flex;
      flex-direction: column;
    }
    .cs-card--active .cs-card__inner {
      box-shadow: 0 22px 64px rgba(0,0,0,.28);
    }
    .cs-card__img {
      width: 100%;
      height: calc(100% - 64px);
      object-fit: cover;
      object-position: center;
      display: block;
      pointer-events: none;
      background: #e6e1d8;
    }
    .cs-card__overlay {
      display: none;
    }
    .cs-card__info {
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 64px;
      padding: 12px 20px;
      background: #fff;
      border-top: 1px solid #f0ede7;
      z-index: 2;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .cs-card__cat {
      font-size: .65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .05em;
      color: #b41824;
      margin-bottom: 2px;
    }
    .cs-card__title {
      font-size: 0.95rem;
      font-weight: 600;
      color: #242628;
      line-height: 1.2;
    }
    /* ── MOBILE ET TABLETTE : grille verticale, deux par deux ────────────────
       La scène 3D est réservée au bureau : elle a besoin d'environ 1150 px (ses
       cartes font 520 px et s'écartent de 270 px de part et d'autre), et entre
       701 et 1000 px la page débordait vraiment à l'horizontale.

       En dessous, c'était un CARROUSEL à flèches. Il montrait un projet à la
       fois : pour en voir dix, il fallait dix gestes, et rien ne disait ce qui
       restait derrière. Une page de réalisations sert à balayer un portfolio du
       regard, pas à le feuilleter. On passe donc à une grille qui DÉFILE VERS LE
       BAS, deux par deux, avec les onze projets présents d'un bout à l'autre.

       Les flèches, le compteur et le suivi d'index ont été RETIRÉS, pas masqués :
       une navigation qui ne navigue plus rien n'a pas à rester dans le DOM. */
    .cs-mobile { display: none; }

    @media (max-width: 1000px) {
      .cs-stage { display: none; }
      .cs-wrap  { padding-bottom: 0; margin-bottom: 0; }

      .cs-mobile {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 8px 0 10px;
      }

      /* carte portrait */
      .cs-mob-card {
        border-radius: 4px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 2px 8px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.06);
        cursor: pointer;
        background: #fff;
        -webkit-tap-highlight-color: transparent;
        display: flex;
        flex-direction: column;
      }
      .cs-mob-card__img {
        width: 100%;
        aspect-ratio: 3.8 / 4;
        object-fit: cover;
        display: block;
        background: #e6e1d8;
      }
      .cs-mob-card__overlay {
        display: none;
      }
      /* Hauteur PLANCHER et non fixe : à 170 px de large, « La Beauté du Geste »
         passe sur deux lignes et une hauteur figée le coupait. */
      .cs-mob-card__info {
        position: relative;
        padding: 10px 12px;
        background: #fff;
        border-top: 1px solid #f0ede7;
        box-sizing: border-box;
        min-height: 62px;
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
      .cs-mob-card__cat {
        font-size: .58rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #b41824;
        margin-bottom: 2px;
      }
      .cs-mob-card__title {
        font-size: .82rem;
        font-weight: 600;
        color: #242628;
        line-height: 1.25;
      }
    }

    /* Tablette : la largeur permet trois colonnes sans écraser les cartes. */
    @media (min-width: 701px) and (max-width: 1000px) {
      .cs-mobile { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
      .cs-mob-card__title { font-size: .95rem; }
      .cs-mob-card__cat   { font-size: .64rem; }
    }

    /* Très petits téléphones : on reste à deux colonnes — une seule donnerait
       onze cartes pleine largeur, soit un défilement interminable, ce que cette
       page cherchait justement à éviter. */
    @media (max-width: 380px) {
      .cs-mobile { gap: 9px; }
      .cs-mob-card__info  { padding: 9px 10px; min-height: 58px; }
      .cs-mob-card__title { font-size: .76rem; }
    }

    /* ── ANIMATION D'ENTRÉE PAGE RÉALISATIONS ── */
    @keyframes realEnter {
      from { opacity: 0; transform: translateY(30px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .real-head,
    .real-stats,
    .cs-wrap,
    .real-cta {
      opacity: 0;
      animation: realEnter .75s cubic-bezier(.22,.61,.36,1) both;
    }
    .real-head  { animation-delay: .08s; }
    .real-stats { animation-delay: .22s; }
    .cs-wrap    { animation-delay: .36s; }
    .real-cta   { animation-delay: .56s; }

    @media (prefers-reduced-motion: reduce) {
      .real-head, .real-stats, .cs-wrap, .real-cta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
      }
    }
