/* ============================================
   viewer.css - Layout principal, Hero, Animations
   ============================================ */

/* --- LAYOUT COMMUN DES SECTIONS --- */
.hero-wrapper,
.projets-section,
.competences-section,
.outils-section,
.cv-section,
.contact-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* --- COMPOSANT SAFARI WINDOW --- */
.safari-window {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-apple);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.safari-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    min-height: 38px;
}

.traffic-lights { display: flex; gap: 6px; flex-shrink: 0; z-index: 1; }
.traffic-light { width: 12px; height: 12px; border-radius: 50%; }
.tl-red    { background: #ff5f57; }
.tl-yellow { background: #ffbd2e; }
.tl-green  { background: #28c840; }

.safari-title {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    display: flex; align-items: center;
}

.safari-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
}

.safari-title-badge .lock-icon { color: #22c55e; font-size: 10px; }
.safari-title-badge .user-icon { color: var(--color-highlight); font-size: 10px; }

.safari-actions {
    font-size: 14px;
    color: var(--text-paragraph);
    opacity: 0.5;
    flex-shrink: 0; z-index: 1;
    min-width: 40px; text-align: right;
}

/* ============================================
   HERO — Centré, aéré, grande photo
   ============================================ */

.hero-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    padding-top: 10rem;  /* espace généreux sous la navbar */
    padding-bottom: 5rem;
}

.hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;         /* espacement aéré entre chaque bloc */
}

/* --- AVATAR — grande taille, mise en valeur --- */
.hero-avatar-wrap {
    position: relative;
    display: inline-block;
}

.hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-glass);
    display: block;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.hero-avatar:hover { transform: scale(1.04); }

.hero-avatar-dot {
    position: absolute;
    bottom: 6px; right: 6px;
    width: 16px; height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: pulse-dot 2.5s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
    50%       { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

/* --- TITRE --- */
.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
}

.highlight { color: var(--color-highlight); }

/* --- DESCRIPTION --- */
.hero-desc {
    font-size: var(--text-base);
    line-height: 1.8;
    max-width: 580px;
    opacity: 0.72;
    margin: 0;
}

/* --- BOUTONS CTA --- */
.hero-buttons {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hero-outline {
    background: rgba(37, 106, 244, 0.12);
    color: var(--color-highlight);
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.btn-hero-outline:hover {
    border-color: var(--color-highlight);
    color: #fff;
    background: var(--color-button);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(37, 106, 244, 0.3);
}

/* Mes projets — blanc */
.btn-hero-white {
    background: #fdfdfd;
    color: #0a0f1d;
    border: 1px solid #fdfdfd;
}

.btn-hero-white:hover {
    background: #e2e8f0;
    border-color: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(253, 253, 253, 0.15);
}

/* Compétences + Mon CV — vert */
.btn-hero-green {
    background: #00986c;
    color: #fff;
    border: 1px solid #00986c;
}

.btn-hero-green:hover {
    background: #00b37e;
    border-color: #00b37e;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(0, 152, 108, 0.35);
}

.btn-hero-cv {
    background: #8028f9;
    color: #fff;
    border: 1px solid #8028f9;
}

.btn-hero-cv:hover {
    background: #9340ff;
    border-color: #9340ff;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(128, 40, 249, 0.45);
}

.btn-hero-solid {
    background: var(--color-button);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 0 18px rgba(37, 106, 244, 0.3);
}

.btn-hero-solid:hover {
    background: var(--color-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(37, 106, 244, 0.5);
}

/* Anciens boutons — compatibilité */
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.5rem; font-size: var(--text-sm); font-weight: 700;
    text-decoration: none; border-radius: var(--radius-sm);
    transition: all 0.2s ease; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--color-button); color: #fff; border: none; }
.btn-primary:hover { transform: translateY(-2px); background: var(--color-button-hover); }
.btn-secondary { background: transparent; color: var(--text-headline); border: 1px solid var(--border-glass); }
.btn-secondary:hover { background: var(--bg-glass); border-color: var(--color-highlight); }
.btn-glow { box-shadow: 0 0 20px rgba(37, 106, 244, 0.35); }
.btn-glow:hover { box-shadow: 0 0 30px rgba(37, 106, 244, 0.55); }

/* --- RÉSEAUX SOCIAUX --- */
.hero-socials {
    display: flex;
    gap: 1.3rem;
    align-items: center;
}

.hero-socials a {
    color: var(--text-paragraph);
    font-size: 1.15rem;
    opacity: 0.45;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
}

.hero-socials a:hover {
    opacity: 1;
    color: var(--color-highlight);
    transform: translateY(-2px);
}

/* ============================================
   À PROPOS — Même style que les cartes compétences
   ============================================ */

.about-section {
    /* Même bg-glass + border-glass que les cartes compétences */
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.about-inner {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    padding: 2.5rem 3rem;
}

.about-text { flex: 1; min-width: 0; }

.about-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin: 0 0 1rem 0;
}

.about-desc {
    font-size: var(--text-base);
    line-height: 1.8;
    opacity: 0.8;
    margin: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.5rem;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.72rem;
    opacity: 0.55;
    line-height: 1.4;
    font-family: var(--font-mono);
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.30s; }

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

/* ============================================
   CV SECTION
   ============================================ */

.cv-section { text-align: center; padding-top: 0; }

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    font-weight: 700;
}

/* ============================================
   FOOTER — Même couleur bg-glass que les cartes,
   même bordure border-glass. Hauteur réduite.
   ============================================ */

.footer-viewer {
    background: var(--bg-glass);          /* identique aux cartes compétences */
    border-top: 1px solid var(--border-glass);
    padding: 0;
    margin-top: 1rem;
    transition: background 0.3s ease;     /* suit le switch de thème */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2rem;
    gap: 1rem;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-paragraph);
    opacity: 0.5;
    margin: 0;
    white-space: nowrap;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-right a {
    color: var(--text-paragraph);
    opacity: 0.4;
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s, color 0.2s;
}

.footer-right a:hover {
    opacity: 1;
    color: var(--color-highlight);
}

.footer-a11y {
    font-family: var(--font-mono);
    font-size: 0.68rem !important;
    border: 1px solid currentColor;
    padding: 2px 7px;
    border-radius: 4px;
    opacity: 0.35 !important;
    letter-spacing: 0.03em;
}

.footer-a11y:hover {
    opacity: 0.9 !important;
    color: var(--color-highlight) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .hero-wrapper,
    .projets-section,
    .competences-section,
    .outils-section,
    .cv-section,
    .contact-section {
        padding: 3rem 1.5rem;
    }

    .hero-wrapper { padding-top: 6rem; gap: 3rem; }

    .about-inner {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card { min-width: 110px; flex: 1; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 2rem; }
    .hero-avatar { width: 130px; height: 130px; }
    .hero-buttons { gap: 0.4rem; }
    .btn-hero { font-size: 0.72rem; padding: 0.5rem 0.9rem; }
    .hero-center { gap: 1.8rem; }
    .hero-wrapper { padding-top: 5rem; gap: 2.5rem; }

    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 0.85rem 1.5rem;
        gap: 0.6rem;
    }
}
