/* ==========================================================================
   Cas Client Single — Maquette-inspired layout
   ========================================================================== */

/* ── PAGE WRAPPER ── */
.ccs-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── HERO ── */
.ccs-hero {
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: #0a0a0a;
    border-radius: 20px;
    margin-top: 16px;
}

.ccs-hero-bg {
    position: absolute;
    inset: 0;
}

.ccs-hero-bg img,
.ccs-hero-bg picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccs-hero-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.ccs-hero-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.4) 40%, rgba(10,10,10,0.15) 70%);
}

.ccs-hero-watermark {
    position: absolute;
    right: -40px;
    bottom: -30px;
    font-size: clamp(140px, 22vw, 300px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 1px var(--accent-15, rgba(102,70,255,0.15));
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.ccs-hero-content {
    position: relative;
    z-index: 2;
    padding: 64px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: end;
}

.ccs-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ccs-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid var(--tag-color, var(--accent));
    color: var(--tag-color, var(--accent));
    border-radius: 100px;
    padding: 5px 14px;
    width: fit-content;
}

.ccs-hero-tag .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.ccs-hero-title {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.035em;
    color: #fff;
    margin: 0;
}

.ccs-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    margin-top: 12px;
    line-height: 1.65;
    max-width: 500px;
}

.ccs-hero-year {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    font-weight: 600;
    margin-top: 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Hero stats (droite) */
.ccs-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: flex-end;
    padding-bottom: 4px;
}

.ccs-hs-val {
    font-size: clamp(36px, 5.5vw, 68px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--accent);
}

.ccs-hs-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-align: right;
    margin-top: 4px;
}

.ccs-hs-div {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.12);
    align-self: flex-end;
}

/* Scroll hint */
.ccs-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    z-index: 2;
}

.ccs-scroll-dot {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    animation: ccs-scroll-pulse 2s ease-in-out infinite;
}

@keyframes ccs-scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── CONTAINER ── */
.ccs-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── METRICS BAND ── */
.ccs-metrics-band {
    display: grid;
    grid-template-columns: repeat(var(--metrics-count, 4), 1fr);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    border-bottom: 1px solid #e5e7eb;
}

.ccs-metric-cell {
    padding: 32px 40px;
    border-right: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ccs-metric-cell:first-child {
    padding-left: 0;
}

.ccs-metric-cell:last-child {
    border-right: none;
    padding-right: 0;
}

.ccs-metric-cell.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ccs-metric-cell:nth-child(2) { transition-delay: 0.1s; }
.ccs-metric-cell:nth-child(3) { transition-delay: 0.2s; }
.ccs-metric-cell:nth-child(4) { transition-delay: 0.3s; }

.ccs-mc-val {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent-text);
}

.ccs-mc-lbl {
    font-size: 12px;
    color: #8a929e;
    margin-top: 6px;
}

/* ── MAIN LAYOUT ── */
.ccs-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
}

.ccs-content {
    padding: 72px 80px;
    border-right: 1px solid #e5e7eb;
}

.ccs-sidebar {
    padding: 72px 48px;
}

/* ── SECTIONS ── */
.ccs-section {
    margin-bottom: 72px;
}

.ccs-section:last-child {
    margin-bottom: 0;
}

.ccs-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8a929e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ccs-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.ccs-section h2 {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 20px;
    margin-top: 0;
}

.ccs-section p {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 16px;
}

.ccs-section p:last-child {
    margin-bottom: 0;
}

/* Steps (approche) */
.ccs-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ccs-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ccs-step:first-child {
    border-top: 1px solid #e5e7eb;
}

.ccs-step.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.ccs-step:nth-child(2) { transition-delay: 0.1s; }
.ccs-step:nth-child(3) { transition-delay: 0.2s; }
.ccs-step:nth-child(4) { transition-delay: 0.3s; }
.ccs-step:nth-child(5) { transition-delay: 0.4s; }
.ccs-step:nth-child(6) { transition-delay: 0.5s; }

.ccs-step-num {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-text, #6646ff);
    letter-spacing: 0.05em;
    padding-top: 3px;
}

.ccs-step-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0a0a0a;
}

.ccs-step-txt {
    font-size: 14px;
    color: #374151;
    line-height: 1.65;
}

/* Deliverables (sidebar) */
.ccs-deliverables {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ccs-deliv {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.45;
    color: #374151;
}

.ccs-deliv:first-child {
    border-top: 1px solid #e5e7eb;
}

.ccs-deliv-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-light, rgba(102, 70, 255, 0.1));
    color: var(--accent-text, #6646ff);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    font-size: 9px;
    font-weight: 700;
}

/* Big word */
.ccs-bigword {
    font-size: clamp(48px, 8vw, 100px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    -webkit-text-stroke: 1.5px #e5e7eb;
    color: transparent;
    margin-bottom: 28px;
    user-select: none;
}

/* ── SIDEBAR ── */
.ccs-sb-block {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid #e5e7eb;
}

.ccs-sb-block:last-child {
    border-bottom: none;
}

.ccs-sb-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a929e;
    margin-bottom: 16px;
}

.ccs-sb-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    background: var(--accent-light);
    color: var(--tag-color, var(--accent-text));
    margin-bottom: 8px;
    margin-right: 4px;
}

.ccs-sb-tag .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.ccs-sb-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 8px;
}

.ccs-sb-year {
    font-size: 12px;
    color: #8a929e;
}

/* Testimonial */
.ccs-testimonial {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 20px;
}

.ccs-testimonial p {
    font-size: 14px;
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 12px;
    color: #374151;
}

.ccs-testimonial-author {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-text);
}

/* CTA sidebar */
.ccs-sb-cta {
    background: #0a0a0a;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
    letter-spacing: 0.02em;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.ccs-sb-cta:hover {
    background: #1a1a1a;
    transform: scale(1.02);
    text-decoration: none;
    color: #fff;
}

.ccs-sb-cta-tel {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* ── GALLERY ── */
.ccs-gallery-section {
    padding: 0 0 72px;
    max-width: 1100px;
    margin: 0 auto;
}

.ccs-gallery-label {
    padding: 0 20px 32px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8a929e;
}

.ccs-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 320px 240px;
    gap: 2px;
    padding: 0 20px;
}

.ccs-gi {
    overflow: hidden;
    position: relative;
    background: #f3f4f6;
}

.ccs-gi:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.ccs-gi:nth-child(2) { grid-column: 3; grid-row: 1; }
.ccs-gi:nth-child(3) { grid-column: 1; grid-row: 2; }
.ccs-gi:nth-child(4) { grid-column: 2; grid-row: 2; }
.ccs-gi:nth-child(5) { grid-column: 3; grid-row: 2; }

/* Si moins de 5 images, fallback en grille simple */
.ccs-gallery-grid.ccs-gallery-simple {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-template-rows: auto;
}

.ccs-gallery-grid.ccs-gallery-simple .ccs-gi {
    grid-column: auto !important;
    grid-row: auto !important;
    aspect-ratio: 16 / 10;
}

.ccs-gi-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
}

.ccs-gi-inner img,
.ccs-gi-inner picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccs-gi:hover .ccs-gi-inner {
    transform: scale(1.04);
}

/* ── LIGHTBOX ── */
.ccs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
}

.ccs-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.ccs-lb-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccs-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ccs-lightbox.is-active .ccs-lb-img {
    opacity: 1;
    transform: scale(1);
}

.ccs-lb-close,
.ccs-lb-prev,
.ccs-lb-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0.6;
}

.ccs-lb-close:hover,
.ccs-lb-prev:hover,
.ccs-lb-next:hover {
    opacity: 1;
}

.ccs-lb-close {
    top: 24px;
    right: 28px;
    font-size: 36px;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccs-lb-prev,
.ccs-lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccs-lb-prev:hover,
.ccs-lb-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.ccs-lb-prev { left: 24px; }
.ccs-lb-next { right: 24px; }

.ccs-lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

/* ── NAVIGATION PROJETS ── */
.ccs-proj-nav {
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fafafa;
    max-width: 1100px;
    margin: 0 auto;
}

.ccs-pn-item {
    padding: 40px 64px;
    transition: background 0.2s;
    text-decoration: none;
    overflow: hidden;
    position: relative;
}

.ccs-pn-item:first-child {
    border-right: 1px solid #e5e7eb;
}

.ccs-pn-item:hover {
    background: #fff;
    text-decoration: none;
}

.ccs-pn-dir {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a929e;
    margin-bottom: 12px;
}

.ccs-pn-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.ccs-pn-arrow {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #e5e7eb;
    transition: transform 0.25s, color 0.25s;
}

.ccs-pn-item:last-child .ccs-pn-arrow {
    right: auto;
    left: 64px;
}

.ccs-pn-item:first-child:hover .ccs-pn-arrow {
    transform: translateY(-50%) translateX(-6px);
    color: #0a0a0a;
}

.ccs-pn-item:last-child:hover .ccs-pn-arrow {
    transform: translateY(-50%) translateX(6px);
    color: #0a0a0a;
}

/* ── GUTENBERG CONTENT ── */
.ccs-gutenberg {
    border-top: 1px solid #e5e7eb;
    padding: 48px 80px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .ccs-hero-content {
        grid-template-columns: 1fr;
        padding: 40px;
        gap: 32px;
    }

    .ccs-hero-stats {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .ccs-hs-div {
        width: 1px;
        height: auto;
        align-self: stretch;
    }

    .ccs-metrics-band {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 40px;
    }

    .ccs-metric-cell:nth-child(2) {
        border-right: none;
        padding-right: 0;
    }

    .ccs-metric-cell:nth-child(3) {
        padding-left: 0;
    }

    .ccs-metric-cell:last-child {
        padding-right: 0;
    }

    .ccs-main {
        grid-template-columns: 1fr;
    }


    .ccs-content {
        padding: 48px 40px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .ccs-sidebar {
        padding: 48px 40px;
    }

    .ccs-gallery-grid {
        padding: 0 40px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 240px 200px;
    }

    .ccs-gi:first-child {
        grid-column: 1 / 3;
    }

    .ccs-gi:nth-child(2) { grid-column: 1; grid-row: 2; }
    .ccs-gi:nth-child(3) { grid-column: 2; grid-row: 2; }
    .ccs-gi:nth-child(4),
    .ccs-gi:nth-child(5) { display: none; }

    .ccs-gallery-label {
        padding: 0 40px 32px;
    }

    .ccs-proj-nav {
        grid-template-columns: 1fr;
    }

    .ccs-pn-item:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .ccs-pn-item {
        padding: 28px 40px;
    }

    .ccs-pn-arrow {
        right: 40px;
    }

    .ccs-pn-item:last-child .ccs-pn-arrow {
        left: 40px;
    }

    .ccs-gutenberg {
        padding: 48px 40px;
    }
}

@media (max-width: 767px) {
    .ccs-hero {
        min-height: 70vh;
    }

    .ccs-hero-content {
        padding: 24px;
    }

    .ccs-hero-title {
        font-size: 28px;
    }

    .ccs-hero-stats {
        flex-wrap: wrap;
    }

    .ccs-hs-val {
        font-size: 32px;
    }

    .ccs-hero-watermark {
        font-size: 100px;
        right: -20px;
        bottom: -15px;
    }

    .ccs-metrics-band {
        grid-template-columns: 1fr 1fr;
        padding: 0 20px;
    }

    .ccs-metric-cell {
        padding: 20px;
    }

    .ccs-metric-cell:first-child,
    .ccs-metric-cell:nth-child(3) {
        padding-left: 0;
    }

    .ccs-metric-cell:nth-child(2),
    .ccs-metric-cell:last-child {
        padding-right: 0;
    }

    .ccs-mc-val {
        font-size: 28px;
    }

    .ccs-content {
        padding: 32px 20px;
    }

    .ccs-sidebar {
        padding: 32px 20px;
    }

    .ccs-bigword {
        font-size: 40px;
    }

    .ccs-gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 0 20px;
        gap: 4px;
    }

    .ccs-gi {
        grid-column: auto !important;
        grid-row: auto !important;
        aspect-ratio: 16 / 10;
    }

    .ccs-gi:nth-child(4),
    .ccs-gi:nth-child(5) {
        display: block;
    }

    .ccs-gallery-label {
        padding: 0 20px 24px;
    }

    .ccs-pn-item {
        padding: 24px 20px;
    }

    .ccs-pn-arrow {
        display: none;
    }

    .ccs-gutenberg {
        padding: 32px 20px;
    }

    .ccs-scroll-hint {
        display: none;
    }
}
