/* ═══════════════════════════════════════════════════════════════
   MACWIN Portfolio — portfolio.css
   @version 1.0.0 — 2026-07-27
   Emplacement : macwin.fr/portfolio/assets/css/portfolio.css
═══════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --port-accent:       #fcb119;
    --port-primary:      #005376;
    --port-dark-bg:      #0d1720;
    --port-dark-bg2:     #111f2e;
    --port-text:         #1a2535;
    --port-text-muted:   #6b7280;
    --port-border:       #e5e7eb;
    --port-bg:           #ffffff;
    --port-bg-light:     #f5f7fa;
    --port-radius:       10px;
    --port-shadow:       0 2px 12px rgba(0,0,0,.07);
    --port-shadow-hover: 0 8px 28px rgba(0,83,118,.13);
}

body.dark-mode {
    --port-bg:           #0f1923;
    --port-bg-light:     #1a2535;
    --port-text:         #e8eaf0;
    --port-text-muted:   #8b9ab0;
    --port-border:       #2a3a4a;
    --port-shadow:       0 2px 12px rgba(0,0,0,.3);
    --port-shadow-hover: 0 8px 28px rgba(0,0,0,.4);
}

body.dark-mode .btn-port-primary { color: #000000 !important;}

body.dark-mode .port-service-num { color: #ffffff; }

body.dark-mode .port-service-item {
    background: #4a4a4a;
    border-color: #555555;
}
body.dark-mode .port-service-item:hover {
    background: #222222;
    border-color: #444444;
}

/* ── Héro ── */
.port-hero {
    position: relative;
    background: var(--port-dark-bg);
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}
.port-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10,18,30,.65);
    z-index: 0;
}
.port-hero-inner {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}
.port-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255,255,255,.6);
    margin-bottom: 1.2rem;
}
.port-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--port-accent);
    flex-shrink: 0;
}
.port-hero-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem,8vw,5.5rem);
    line-height: .95;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -.02em;
    margin: 0 0 1.2rem;
}
.port-hero-accent { color: var(--port-accent); }
.port-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,.72);
    max-width: 500px;
    line-height: 1.65;
    margin-bottom: 2rem;
}
.port-hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Boutons ── */
.btn-port-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--port-accent);
    color: #000000;
    font-weight: 600;
    font-size: .92rem;
    padding: .8rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
}
.btn-port-primary:hover { opacity: .85; color: #000; }
.btn-port-primary.btn-sm { padding: .5rem 1rem; font-size: .82rem; }

.btn-port-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    color: #fff;
    font-weight: 500;
    font-size: .92rem;
    padding: .8rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.5);
    cursor: pointer;
    transition: all .2s;
}
.btn-port-outline:hover { background: rgba(255,255,255,.12); }

/* ── Layout ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.port-section { padding: 4rem 0; background: var(--port-bg); }
.port-section-dark { background: var(--port-dark-bg); color: #fff; }
.port-section-grey { background: var(--port-bg-light); }
.port-section-head { margin-bottom: 2rem; }
.port-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--port-accent);
    display: block;
    margin-bottom: .5rem;
}
.port-section-title {
    font-size: clamp(1.6rem,4vw,2.6rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -.02em;
    color: var(--port-text);
    margin: 0 0 .5rem;
}
.port-section-dark .port-section-title { color: #fff; }
.port-section-sub { color: var(--port-text-muted); line-height: 1.65; }

/* ── Filtres ── */
.port-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.port-filter {
    background: none;
    border: 1px solid var(--port-border);
    color: var(--port-text-muted);
    border-radius: 50px;
    padding: .4rem 1rem;
    font-size: .82rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.port-section-dark .port-filter {
    border-color: rgba(255,255,255,.2);
    color: rgba(255,255,255,.6);
}
.port-filter:hover,
.port-filter.active {
    background: var(--port-accent);
    border-color: var(--port-accent);
    color: #000;
    font-weight: 600;
}

/* ── Séparateur catégorie ── */
.port-cat-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.2rem;
}
.port-cat-divider h3 {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--port-text-muted);
    white-space: nowrap;
}
.port-section-dark .port-cat-divider h3 { color: rgba(255,255,255,.4); }
.port-cat-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--port-border);
}
.port-section-dark .port-cat-divider::after { background: rgba(255,255,255,.1); }

/* ── Grille projets ── */
.port-cat-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.port-item {
    position: relative;
    border-radius: var(--port-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--port-bg);
    box-shadow: var(--port-shadow);
    transition: transform .2s, box-shadow .2s;
}
.port-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--port-shadow-hover);
}
.port-section-dark .port-item { background: var(--port-dark-bg2); }
.port-item-featured { grid-column: 1 / -1; }
.port-item-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #dde2e8;
}
.port-item-featured .port-item-img { height: 420px; }
.port-item-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}
.port-item:hover .port-item-img img { transform: scale(1.04); }
.port-item-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #e5e9ef;
    color: #9ca3af; font-size: .85rem;
}
.port-section-dark .port-item-placeholder { background: rgba(255,255,255,.05); color: rgba(255,255,255,.2); }
.port-item-info {
    padding: .9rem 1.1rem 1rem;
}
.port-item-cats {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--port-accent);
    margin-bottom: .3rem;
}
.port-item-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--port-text);
    line-height: 1.3;
}
.port-section-dark .port-item-title { color: #fff; }
.port-item-featured .port-item-title { font-size: 1.2rem; }
.port-featured-badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: var(--port-accent);
    color: #000;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .25rem .7rem;
    border-radius: 20px;
    z-index: 2;
}
.port-item-link {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.port-empty {
    text-align: center;
    padding: 3rem 0;
    color: rgba(255,255,255,.3);
}

/* ── Modals — CORRIGÉES ── */
.port-modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 1000;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}
.port-modal.open { display: flex; align-items: flex-start; justify-content: center; }
.port-modal-inner {
    width: 100%;
    max-width: 860px;
    background: var(--port-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: auto;
}
body.dark-mode .port-modal-inner { background: #1a2535; }
.port-modal-close {
    position: absolute; top: .8rem; right: .8rem; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,.5); border: none; color: #fff;
    font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.port-modal-close:hover { background: rgba(0,0,0,.8); }

/* Galerie modale — corrigée */
.port-modal-gallery {
    position: relative;
    background: #000;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.port-modal-slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.port-modal-slide.active { display: block; }
.port-modal-slide-placeholder {
    display: none;
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,.3); font-size: .9rem;
}
.port-modal-slide-placeholder.active { display: flex; }
.port-modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.5); border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s; z-index: 5;
}
.port-modal-nav:hover { background: rgba(0,0,0,.8); }
.port-modal-prev { left: .8rem; }
.port-modal-next { right: .8rem; }
.port-modal-counter {
    position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,.55); color: #fff; font-size: .72rem;
    padding: .2rem .6rem; border-radius: 10px;
}
.port-modal-body { padding: 1.8rem 2rem; }
.port-modal-meta { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; flex-wrap: wrap; }
.port-modal-cat {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
    color: var(--port-accent); font-weight: 600;
}
.port-modal-year { font-size: .78rem; color: var(--port-text-muted); }
.port-modal-title { font-size: 1.5rem; font-weight: 700; color: var(--port-text); margin: 0 0 .3rem; }
body.dark-mode .port-modal-title { color: #fff; }
.port-modal-client { font-size: .88rem; color: var(--port-text-muted); margin-bottom: 1rem; }
.port-modal-desc { font-size: .92rem; color: var(--port-text-muted); line-height: 1.7; margin-bottom: 1rem; }
.port-modal-techs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.2rem; }
.port-modal-techs span {
    font-size: .75rem; border: 1px solid var(--port-border);
    border-radius: 4px; padding: .15rem .5rem; color: var(--port-text-muted);
}
.port-modal-quote {
    margin: 1rem 0; padding: .8rem 1.2rem;
    border-left: 3px solid var(--port-accent);
    background: var(--port-bg-light);
    border-radius: 0 6px 6px 0;
    font-style: italic; color: var(--port-text-muted); font-size: .9rem;
}
body.dark-mode .port-modal-quote { background: rgba(255,255,255,.05); }
.port-modal-quote cite { display: block; margin-top: .4rem; font-style: normal; font-size: .8rem; font-weight: 600; color: var(--port-text); }
body.dark-mode .port-modal-quote cite { color: #fff; }
.port-modal-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ── Avis clients — étoiles ── */
.port-avis-slider { max-width: 720px; margin: 0 auto; overflow: hidden; }
.port-avis-item { display: none; text-align: center; padding: 1rem; }
.port-avis-item.active { display: block; }
.port-avis-stars {
    font-size: 1.2rem;
    color: var(--port-accent);
    letter-spacing: .1em;
    margin-bottom: .8rem;
    display: block;
}
.port-avis-quote { font-size: 4rem; line-height: 1; color: var(--port-accent); font-family: Georgia,serif; margin-bottom: -.5rem; }
.port-avis-text { font-size: 1.05rem; line-height: 1.75; color: var(--port-text-muted); margin-bottom: 1.8rem; font-style: italic; }
.port-section-dark .port-avis-text { color: rgba(255,255,255,.65); }
.port-avis-author { display: flex; align-items: center; gap: .8rem; justify-content: center; }
.port-avis-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--port-border); }
.port-avis-avatar-letter {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--port-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.port-avis-author strong { display: block; font-size: .92rem; color: var(--port-text); }
.port-section-dark .port-avis-author strong { color: #fff; }
.port-avis-author small { display: block; font-size: .78rem; color: var(--port-text-muted); }
.port-avis-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1.5rem; }
.port-avis-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--port-border); cursor: pointer; border: none; padding: 0; transition: background .2s;
}
.port-avis-dot.active { background: var(--port-accent); }

/* ── Références ── */
.port-refs-grid { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; }
.port-ref-item { text-align: center; }
.port-ref-item img { max-height: 55px; max-width: 130px; object-fit: contain; filter: grayscale(1); opacity: .55; transition: all .2s; }
.port-ref-item:hover img { filter: none; opacity: 1; }
.port-ref-nom { font-size: .88rem; color: var(--port-text-muted); }

/* ── Responsive ── */
@media (max-width:900px) {
    .port-cat-grid { grid-template-columns: repeat(2,1fr); }
    .port-item-featured { grid-column: 1 / -1; }
    .port-modal-gallery { height: 300px; }
}
@media (max-width:600px) {
    .port-cat-grid { grid-template-columns: 1fr; }
    .port-item-featured { grid-column: 1; }
    .port-hero-title { font-size: 2.5rem; }
    .port-modal-inner { border-radius: 0; }
    .port-modal-gallery { height: 240px; }
    .port-modal-body { padding: 1.2rem; }
}

/* ── Description tronquée ── */
.port-item-desc {
    font-size: .8rem;
    color: var(--port-text-muted);
    line-height: 1.55;
    margin: .4rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.port-section-dark .port-item-desc { color: rgba(255,255,255,.55); }
.port-item-desc-feat { -webkit-line-clamp: 3; }
.port-item-title-feat { font-size: 1.15rem; }
.port-item-more {
    color: var(--port-primary);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.port-section-dark .port-item-more { color: var(--port-accent); }

#contact {
    background-image: var(--form-bg-img);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
