/* Fonts Declarations */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta Alt';
    src: url('../fonts/Recoleta-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lufga';
    src: url('../fonts/Lufga-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lufga';
    src: url('../fonts/Lufga-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Couleurs corrigées pour l'accessibilité */
:root {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --accent-color: #d9362b;
    --link-color: #d9362b;
    --modal-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: rgba(217, 54, 43, 0.1);

    /* Font variables */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Recoleta Alt', Georgia, serif;
    --font-tech: 'Space Grotesk', monospace;
    --font-alt: 'Lufga', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #f5f5f5;
        --modal-bg: #1e1e1e;
        --link-color: #d9362b;
    }
}

/* Support manuel via JS */
:root[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --modal-bg: #1e1e1e;
    --link-color: #d9362b;
}

:root[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --modal-bg: #ffffff;
    --link-color: #d9362b;
}

::selection {
    background-color: var(--accent-color);
    color: #FFF
}

/* Personnalisation de la Scrollbar (Largeur et accessibilité) */
html {
    scrollbar-color: var(--accent-color) var(--bg-color);
    scrollbar-width: auto
}

::-webkit-scrollbar {
    width: 14px
}

::-webkit-scrollbar-track {
    background: var(--bg-color)
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
    border: 3px solid var(--bg-color)
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color)
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
}

main {
    padding: 48px 32px;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box
}

.greeting {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 12vw, 5.5rem);
    font-weight: 700;
    margin: 0 0 32px 0;
    display: block
}

.hero-text .name {
    display: block;
}

.hero-text .role {
    display: block;
    color: var(--accent-color);
}

.hero-text {
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 6vw, 2.8rem);
    font-weight: 400;
    margin: 16px 0;
    line-height: 1.2
}

.description {
    font-family: var(--font-main);
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 40px;
    opacity: .9;
    line-height: 1.5;
    transition: opacity 0.5s ease;
    min-height: 3.2em;
    /* Prevents layout shift */
}

.description.fade-out {
    opacity: 0;
}

.availability {
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(217, 54, 43, 0.08);
    border: 1px solid rgba(217, 54, 43, 0.15);
    border-radius: 99px;
    width: fit-content;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: var(--text-color);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    animation: slideIn .8s ease-out forwards;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    border: 1px solid var(--border-color);
    cursor: pointer
}

.linkedin-link:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15)
}

.journal-link {
    display: block;
    text-align: center;
    margin-top: 64px;
    font-size: 0.85rem;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    padding: 8px;
    font-weight: 500;
}

.journal-link:hover,
.journal-link:focus-visible {
    opacity: 0.8;
}

dialog {
    border: none;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 700px;
    width: 90%;
    background: var(--modal-bg);
    color: var(--text-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, .5);
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 600px) {
    dialog {
        padding: 1.5rem;
        width: 92%;
    }

    .task-item {
        padding: 16px;
        gap: 12px;
    }

    .journal-header {
        margin-bottom: 24px;
    }

    .journal-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    dialog {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .task-item {
        padding: 12px;
        gap: 10px;
    }
}

dialog::backdrop {
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(10px)
}

dialog h2 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
}

dialog h2:focus,
dialog h2:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

dialog ul {
    list-style: none;
    padding: 0;
    margin: 20px 0
}

dialog li {
    margin-bottom: 12px;
    line-height: 1.4;
    padding-left: 20px;
    position: relative
}

dialog li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: var(--accent-color)
}

.close-modal {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 14px;
    border-radius: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s
}

.close-modal:hover {
    opacity: 0.9
}

*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 5px
}

.skip-link {
    position: absolute;
    left: 24px;
    top: 24px;
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    z-index: 2000;
    transform: translateY(-150%);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 32px;
    list-style: none;
    padding: 0;
}

.contact-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.social-proof {
    margin: 40px 0;
    padding: 24px;
    border-left: 4px solid var(--accent-color);
    background: rgba(217, 54, 43, 0.04);
    border-radius: 0 16px 16px 0;
}

.testimonial {
    margin: 0;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.6;
    color: var(--text-color);
}

.testimonial-author {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
}

.skill-tag {
    font-family: var(--font-tech);
    font-size: 0.9rem;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-weight: 500;
    color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
    .skill-tag {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.contact-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.email-link {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: #FFF;
    background-color: var(--accent-color);
    border: none;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    animation: slideIn .8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.email-link:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 54, 43, 0.2);
}

.linkedin-link:hover {
    background-color: rgba(47, 69, 55, 0.05);
    border-color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
    .linkedin-link:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }
}

:root[data-theme="dark"] .linkedin-link:hover,
:root[data-theme="dark"] .skill-tag {
    background-color: rgba(255, 255, 255, 0.08);
}

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: rgba(128, 128, 128, 0.1);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Journal de Bord Styles */
.journal-header {
    margin-bottom: 32px;
}

.journal-header h2 {
    margin: 0 0 8px;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.journal-subtitle {
    font-family: var(--font-tech);
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 600;
    opacity: 0.9;
}

.task-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.task-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease;
}

:root[data-theme="dark"] .task-item {
    background: rgba(255, 255, 255, 0.03);
}

.status-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.status-box svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.task-content {
    flex-grow: 1;
}

.task-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    display: block;
}

.task-details {
    font-size: 0.9rem;
    opacity: 0.8;
    padding-left: 0;
    list-style: none;
    margin-top: 6px;
}

.task-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
}

.task-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ═══════════════════════════════════════════
   MODE IMPRESSION — @media print
   ═══════════════════════════════════════════ */
@media print {

    /* ── Reset global : fond blanc, texte noir, économie d'encre ── */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        transition: none !important;
        animation: none !important;
    }

    body {
        font-family: var(--font-main);
        line-height: 1.6;
        margin: 0;
        padding: 0;
        display: block;
        min-height: auto;
    }

    main {
        padding: 0;
        max-width: 100%;
    }

    /* ── Masquer les éléments interactifs ── */
    .theme-toggle,
    .info-trigger,
    .skip-link,
    dialog,
    dialog::backdrop,
    noscript {
        display: none !important;
    }

    /* ── Hero : tailles lisibles sur papier ── */
    .greeting {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }

    .hero-text {
        font-size: 1.6rem;
        margin: 8px 0;
    }

    .hero-text .role {
        color: #333 !important;
    }

    /* ── Disponibilité : garder le texte, supprimer le badge ── */
    .availability {
        display: inline;
        padding: 0;
        border: none;
        background: none !important;
        font-size: 0.95rem;
    }

    .pulse-dot {
        display: inline-block;
        width: 6px;
        height: 6px;
        background: #000 !important;
        border-radius: 50%;
    }

    .pulse-dot::after {
        display: none;
    }

    /* ── Compétences : layout compact ── */
    .skills-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 8px 0 16px;
        padding: 0;
    }

    .skill-tag {
        font-size: 0.85rem;
        padding: 3px 10px;
        border: 1px solid #999;
        border-radius: 12px;
    }

    /* ── Description : forcer la visibilité ── */
    .description,
    .description.fade-out {
        opacity: 1 !important;
        font-size: 1.1rem;
        margin-bottom: 20px;
        min-height: auto;
    }

    /* ── Témoignage : garder la bordure ── */
    .social-proof {
        margin: 20px 0;
        padding: 12px 16px;
        border-left: 3px solid #d9362b !important;
    }

    .testimonial {
        font-size: 1rem;
    }

    .testimonial-author {
        color: #d9362b !important;
    }

    /* ── Liens : afficher les URLs ── */
    .contact-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .linkedin-link,
    .email-link {
        display: inline;
        padding: 0;
        border: none;
        font-weight: 700;
        font-size: 1rem;
        text-decoration: underline;
    }

    .linkedin-link svg {
        display: none;
    }

    .linkedin-link::after {
        content: " (" attr(href) ")";
        font-weight: 400;
        font-size: 0.8rem;
        word-break: break-all;
    }

    .email-link::after {
        content: " — gregory.desplaces@gmail.com";
        font-weight: 400;
        font-size: 0.8rem;
    }

    /* ── Pas de saut de page au milieu du contenu ── */
    .hero-text,
    .social-proof,
    .contact-actions {
        break-inside: avoid;
    }
}