/* ============================================================
 *  Sublime TIC Solutions – Site vitrine
 *  Charte : BLEU en couleur principale (#1D9CE0),
 *           BLANC pour les contrastes,
 *           ORANGE (#F28C37) en simple touche d'accent.
 *  Police : Inter (identique à sublimeticsolutions.com)
 * ============================================================ */

:root {
    /* Bleu : couleur principale */
    --blue: #1D9CE0;
    --blue-dark: #1682c7;
    --blue-deep: #0d5a8c;     /* fonds sombres (pied de page) */
    --blue-light: #e8f5fc;    /* fonds clairs */

    /* Orange : touches d'accent uniquement */
    --orange: #F28C37;

    /* Neutres */
    --white: #ffffff;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-900: #111827;
    --whatsapp: #25D366;

    /* Formes */
    --radius: 8px;
    --shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
    --shadow-lg: 0 10px 25px rgba(13, 90, 140, 0.15);
    --header-h: 72px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--white);
    color: var(--gray-600);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
}

/* ---------- Boutons (bleu ou blanc) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover { transform: translateY(-2px); }

/* Bouton bleu plein */
.btn-primary {
    background: var(--blue-dark);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-deep);
    box-shadow: 0 10px 24px rgba(29, 156, 224, 0.35);
}

/* Bouton contour bleu (sur fond blanc) */
.btn-outline {
    background: var(--white);
    color: var(--blue-dark);
    border-color: var(--blue);
}

.btn-outline:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: var(--white);
}

/* Bouton blanc plein (sur fond bleu) */
.btn-white {
    background: var(--white);
    color: var(--blue-dark);
}

.btn-white:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }

/* Bouton contour blanc (sur fond bleu) */
.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-ghost:hover {
    background: var(--white);
    color: var(--blue-dark);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #0b3d1f;
}

.btn-whatsapp:hover { box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35); }

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

/* ---------- En-tête (blanc) ---------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header.scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: var(--shadow);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--gray-900);
}

.logo-img {
    width: 40px;
    height: 30px;
    object-fit: contain;
}

.logo-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--blue);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    position: relative;
}

/* Petite touche orange sur le logo */
.logo-box::after {
    content: '';
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--orange);
    border: 2px solid var(--white);
}

.logo-text { font-size: 1rem; font-weight: 500; }
.logo-text strong { font-weight: 800; color: var(--blue-dark); }

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    transition: color 0.25s ease;
}

.nav-link:hover { color: var(--blue-dark); }

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--blue);
    transition: width 0.25s ease;
}

.nav-link:hover::after { width: 100%; }
.nav-cta { padding: 0.6rem 1.2rem; }

.burger {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--blue-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Accueil (fond bleu, texte blanc) ---------- */
.hero {
    padding: calc(var(--header-h) + 4rem) 0 5rem;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.14), transparent 40%),
        linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    color: var(--white);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

/* Aperçu de réalisations dans des fenêtres de navigateur */
.hero-showcase {
    position: relative;
    aspect-ratio: 16 / 11;
}

.shot {
    position: absolute;
    margin: 0;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(8, 47, 73, 0.35);
}

.shot img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

.shot-bar {
    display: flex;
    gap: 5px;
    padding: 7px 10px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--gray-200);
}

.shot-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.shot-bar i:first-child { background: var(--orange); }

.shot-main { width: 78%; left: 11%; top: 12%; z-index: 2; }
.shot-top { width: 46%; right: 0; top: 0; z-index: 1; opacity: 0.95; }
.shot-bottom { width: 46%; left: 0; bottom: 0; z-index: 3; }

.eyebrow {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

/* Touche orange : le mot mis en avant */
.accent {
    color: var(--white);
    background: linear-gradient(transparent 68%, var(--orange) 68%, var(--orange) 92%, transparent 92%);
    padding: 0 0.1em;
}

.hero-text {
    font-size: 1.125rem;
    max-width: 620px;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--blue-light); }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.85rem;
}

/* Touche orange : petit trait sous les titres */
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: var(--orange);
}

.section-text { font-size: 1.05rem; }

/* ---------- Compétences (photos) ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--blue-deep);
    transition: box-shadow 0.3s ease;
}

.skill-card:hover { box-shadow: 0 20px 40px rgba(13, 90, 140, 0.3); }

.skill-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;   /* cache le texte alternatif si l'image ne charge pas */
    transition: transform 0.5s ease;
}

.skill-card:hover img { transform: scale(1.08); }

/* Dégradé bleu nuit sur la photo pour lire le texte blanc */
.skill-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(8, 47, 73, 0.95) 0%, rgba(13, 90, 140, 0.55) 45%, transparent 75%);
    color: var(--white);
}

.skill-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.skill-list { list-style: none; }

.skill-list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.3rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
}

.skill-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
}

/* ---------- Réalisations ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}

/* Projets cachés jusqu'au clic sur « Voir plus » */
.project-card.is-hidden { display: none; }

.projects-grid.show-all .project-card.is-hidden {
    display: flex;
    animation: fadeIn 0.4s ease both;
}

.project-visual {
    position: relative;
    border-bottom: 1px solid var(--gray-200);
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.project-card:hover .project-visual img { transform: scale(1.05); }

.project-initials {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.04em;
}

.project-type {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    background: var(--white);
    color: var(--blue-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.project-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.project-link {
    align-self: flex-start;
    color: var(--blue-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.project-link:hover { text-decoration: underline; }

.more-wrap {
    text-align: center;
    margin-top: 2.5rem;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Contact (fond bleu, texte blanc) ---------- */
.contact {
    padding: 4.5rem 0;
    background:
        radial-gradient(circle at 10% 100%, rgba(255, 255, 255, 0.12), transparent 40%),
        linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
}

.contact-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.contact-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.contact-text {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.92);
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-infos {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    font-size: 0.95rem;
}

.contact-infos a {
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    overflow-wrap: anywhere;
}

.contact-infos a:hover { border-bottom-color: var(--white); }

/* ---------- Pied de page (bleu foncé) ---------- */
.footer {
    background: var(--blue-deep);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    font-size: 0.875rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.footer-links a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Bouton WhatsApp flottant ---------- */
.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--whatsapp);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 90;
    transition: transform 0.25s ease;
}

.whatsapp-float:hover { transform: scale(1.08); }

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}

/* ---------- Apparition au défilement ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .projects-grid.show-all .project-card.is-hidden { animation: none; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- Écrans moyens ---------- */
@media (max-width: 1200px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Tablette ---------- */
@media (max-width: 960px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-showcase { max-width: 640px; width: 100%; margin: 0 auto; }
    .contact-inner { flex-direction: column; text-align: center; }
    .contact-infos, .contact-buttons { justify-content: center; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .burger { display: flex; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1rem 1.5rem;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s;
    }

    .nav.open {
        transform: none;
        visibility: visible;
    }

    .nav-link {
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-link::after { display: none; }
    .nav-cta { margin-top: 1rem; }

    .skills-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .skill-card { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 0.9rem; }
    .hero { padding: calc(var(--header-h) + 3rem) 0 3.5rem; }
    .section, .contact { padding: 3.5rem 0; }
    .hero-buttons .btn, .contact-buttons .btn { width: 100%; }
    .skill-card { aspect-ratio: 1 / 1; }
    .hero-showcase { aspect-ratio: 16 / 12; }
    .footer-inner { justify-content: center; text-align: center; }
}
