@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Special+Elite&family=Patrick+Hand&display=swap');

:root {
    --paper-main:    #fdf8f2;
    --paper-warm:    #fffcf7;
    --paper-aged:    #f5eddf;
    --paper-lines:   #e0d5c2;
    --ink:           #2e2318;
    --ink-red:       #c75b7a;
    --ink-blue:      #5878b8;
    --pencil:        #7a6e5e;

    --sticker-yellow:  #f9e4a0;   /* jaune */
    --sticker-pink:    #f4a7c0;   /* rose */
    --sticker-peach:   #f5c4a1;   /* pêche */
    --sticker-orange:  #f5c4a1;   /* pêche */
    --sticker-blue:    #a8cff0;   /* bleu ciel */
    --sticker-lilac:   #cdb8f0;   /* lilas */
    --sticker-red:     #f0a0b0;   /* rose foncé */
    --sticker-sage:    #b8d8b0;   /* vert */
    --sticker-butter:  #f5dfa0;   /* beige jaune */
    --sticker-sky:     #b0d8f0;   /* bleu clair */

    --tape-yellow:   rgba(249, 228, 160, 0.72);
    --tape-white:    rgba(255, 255, 255, 0.60);
    --tape-pink:     rgba(244, 167, 192, 0.55);
    --tape-blue:     rgba(168, 207, 240, 0.55);

    --shadow-sticker: 4px 4px 0px rgba(0,0,0,0.35);
    --shadow-photo:   6px 6px 0px rgba(0,0,0,0.25);
    --shadow-lift:    8px 10px 0px rgba(0,0,0,0.3);

    --font-handwrite:  'Caveat', cursive;
    --font-typewriter: 'Special Elite', cursive;
    --font-marker:     'Patrick Hand', cursive;

    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --paper-main:  #1c1810;
    --paper-warm:  #221e14;
    --paper-aged:  #2a2418;
    --paper-lines: #3a3020;
    --ink:         #f0e8d0;
    --ink-red:     #ff6b5e;
    --ink-blue:    #7ab8ff;
    --pencil:      #b0a890;
    --shadow-sticker: 4px 4px 0px rgba(0,0,0,0.6);
    --shadow-photo:   6px 6px 0px rgba(0,0,0,0.5);
    --shadow-lift:    8px 10px 0px rgba(0,0,0,0.55);
}

[data-theme="dark"] body { background-color: var(--paper-main); }
[data-theme="dark"] .header { background: rgba(28,24,16,0.97); border-bottom-color: #3a3020; }
[data-theme="dark"] .nav-link { color: var(--ink); }
[data-theme="dark"] .logo { color: var(--ink); }
[data-theme="dark"] .lang-btn,
[data-theme="dark"] .lang-dropdown { background: var(--paper-warm); color: var(--ink); border-color: #3a3020; }
[data-theme="dark"] .lang-option { color: var(--ink); }
[data-theme="dark"] .lang-option:hover { background: #3a3020; }
[data-theme="dark"] .project-card,
[data-theme="dark"] .creation-card,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .education-item { background: var(--paper-warm); border-color: #3a3020; }
[data-theme="dark"] .project-title,
[data-theme="dark"] .creation-title,
[data-theme="dark"] .timeline-title,
[data-theme="dark"] .project-detail-title,
[data-theme="dark"] .project-detail-section h3,
[data-theme="dark"] .about-section h3,
[data-theme="dark"] .education-item h4,
[data-theme="dark"] .skill-name,
[data-theme="dark"] .project-info-value,
[data-theme="dark"] .contact-info p { color: var(--ink); }
[data-theme="dark"] .timeline-description,
[data-theme="dark"] .timeline-date,
[data-theme="dark"] .project-detail-section p,
[data-theme="dark"] .project-detail-section li,
[data-theme="dark"] .about-section p,
[data-theme="dark"] .creation-desc,
[data-theme="dark"] .education-school { color: var(--pencil); }
[data-theme="dark"] .filter-btn { background: var(--paper-warm); border-color: #3a3020; color: var(--ink); }
[data-theme="dark"] .skill-bar { background: #3a3020; }
[data-theme="dark"] .project-info-grid { background: var(--paper-aged); border-color: #3a3020; }
[data-theme="dark"] .footer { background: #0e0c08; }
[data-theme="dark"] .projects-section,
[data-theme="dark"] .timeline-section { background: var(--paper-main); }
[data-theme="dark"] .creations-section { background: var(--paper-warm); }
[data-theme="dark"] .creation-category { background: var(--sticker-lilac); color: #1a1208; }
[data-theme="dark"] .project-info-label { color: var(--ink-red); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
    transition-delay: 0s !important;
}

body {
    font-family: var(--font-marker);
    color: var(--ink);
    background-color: var(--paper-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Fond papier ligné */
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent 0px, transparent 27px,
            rgba(180,160,120,0.25) 27px, rgba(180,160,120,0.25) 28px
        ),
        linear-gradient(90deg,
            transparent 58px,
            rgba(200,80,80,0.18) 58px, rgba(200,80,80,0.18) 60px,
            transparent 60px
        );
    background-attachment: local;
}


a { color: var(--ink); text-decoration: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@keyframes wobble {
    0%,100% { transform: rotate(var(--rot, -1deg)); }
    25%      { transform: rotate(calc(var(--rot, -1deg) + 4deg)) scale(1.03); }
    75%      { transform: rotate(calc(var(--rot, -1deg) - 4deg)) scale(0.98); }
}
@keyframes bounce-in {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.12) rotate(3deg); opacity: 1; }
    80%  { transform: scale(0.96) rotate(-1deg); }
    100% { transform: scale(1) rotate(var(--rot, 0deg)); }
}
@keyframes stamp-in {
    0%   { transform: scale(1.4) rotate(-6deg); opacity: 0; }
    55%  { transform: scale(0.93) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(var(--rot, 0deg)); }
}
@keyframes float {
    0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); }
    50%      { transform: translateY(-7px) rotate(calc(var(--rot,0deg) + 1.5deg)); }
}
@keyframes shake {
    0%,100% { transform: rotate(var(--rot,0deg)); }
    20%     { transform: rotate(calc(var(--rot,0deg) - 6deg)); }
    40%     { transform: rotate(calc(var(--rot,0deg) + 5deg)); }
    60%     { transform: rotate(calc(var(--rot,0deg) - 4deg)); }
    80%     { transform: rotate(calc(var(--rot,0deg) + 3deg)); }
}
@keyframes slide-down {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
@keyframes peel-up {
    0%   { transform: rotate(var(--rot,0deg)); box-shadow: var(--shadow-sticker); }
    100% { transform: rotate(calc(var(--rot,0deg) + 1.5deg)) translateY(-8px) translateX(3px); box-shadow: var(--shadow-lift); }
}
@keyframes iconPop {
    0%   { transform: scale(0) rotate(-180deg); }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--paper-warm);
    border-bottom: 3px solid var(--ink);
    box-shadow: 0 3px 0 var(--ink), 0 6px 0 rgba(0,0,0,0.08);
    z-index: 1000;
    animation: slide-down 0.5s ease-out;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    gap: 12px;
}

.logo {
    font-family: var(--font-handwrite);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 1px;
    transform: rotate(-2deg);
    display: inline-block;
    background: linear-gradient(transparent 55%, rgba(245,216,0,0.6) 55%);
    padding: 0 4px;
}

.nav { display: flex; align-items: center; gap: 20px; }

.nav-link {
    font-family: var(--font-handwrite);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: var(--ink-red);
    transition: width 0.25s ease;
}
.nav-link:hover { color: var(--ink-red); }
.nav-link:hover::after { width: 100%; }

.btn-about {
    font-family: var(--font-handwrite);
    font-size: 18px;
    font-weight: 700;
    padding: 7px 20px;
    background: var(--sticker-orange);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: var(--shadow-sticker);
    transform: rotate(-1.5deg);
    transition: all 0.2s var(--bounce);
    cursor: pointer;
}
.btn-about::after { display: none; }
.btn-about:hover {
    transform: rotate(1.5deg) translateY(-4px);
    box-shadow: var(--shadow-lift);
    color: var(--ink);
}

.language-selector { position: relative; }

.lang-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-typewriter);
    font-size: 14px;
    color: var(--ink);
    box-shadow: var(--shadow-sticker);
    transform: rotate(1deg);
    transition: all 0.2s var(--bounce);
}
.lang-btn:hover { transform: rotate(-1.5deg) translateY(-3px); box-shadow: var(--shadow-lift); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: var(--shadow-photo);
    padding: 6px;
    min-width: 150px;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px) rotate(-1deg);
    transition: all 0.25s var(--bounce);
}
.lang-dropdown.active {
    opacity: 1; visibility: visible;
    transform: translateY(0) rotate(-0.5deg);
}
.lang-option {
    display: block; width: 100%;
    padding: 8px 12px;
    background: none; border: none;
    text-align: left; cursor: pointer;
    font-family: var(--font-typewriter);
    font-size: 14px; color: var(--ink);
    border-bottom: 1px dashed var(--paper-lines);
    transition: background 0.15s;
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: rgba(245,216,0,0.35); padding-left: 18px; }

.theme-toggle {
    width: 52px; height: 26px;
    background: var(--paper-aged);
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    box-shadow: var(--shadow-sticker);
    transform: rotate(2deg);
    transition: all 0.3s var(--bounce);
    padding: 0; overflow: hidden; position: relative;
}
.theme-toggle:hover { transform: rotate(-2deg) scale(1.12); box-shadow: var(--shadow-lift); }
.theme-toggle::before { display: none; }

[data-theme="dark"] .theme-toggle { background: #2a2418; border-color: #6a6050; }

.theme-toggle-slider {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: var(--sticker-yellow);
    border: 1.5px solid var(--ink);
    border-radius: 0;
    transition: transform 0.35s var(--bounce);
    display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(25px);
    background: var(--sticker-lilac);
}
.theme-icon { font-size: 11px; }
.theme-icon-sun  { display: block; }
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun  { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }

.hero {
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
    background: var(--paper-warm);
    background-image:
        linear-gradient(rgba(180,160,120,0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180,160,120,0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    border-bottom: 3px solid var(--ink);
}


.hero::after { display: none; }

.hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative; z-index: 2;
}

.hero-content {
    position: relative; z-index: 2;
    animation: stamp-in 0.8s var(--bounce) both;
}

.hero-title {
    font-family: var(--font-handwrite);
    font-size: clamp(50px, 8vw, 82px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 20px;
    transform: rotate(-1.5deg);
    display: inline-block;
    position: relative;
}
.hero-title::before {
    content: '';
    position: absolute;
    bottom: 6px; left: -6px; right: -6px;
    height: 20px;
    background: rgba(245,216,0,0.55);
    transform: skewX(-4deg) rotate(-0.5deg);
    z-index: -1;
}

.hero-subtitle {
    font-family: var(--font-typewriter);
    font-size: clamp(13px, 2vw, 17px);
    color: var(--pencil);
    display: inline-block;
    padding: 8px 16px;
    background: var(--tape-white);
    border: 1px dashed var(--paper-lines);
    transform: rotate(0.8deg);
    position: relative;
}
/* Scotch coins subtitle */
.hero-subtitle::before,
.hero-subtitle::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 38px; height: 14px;
    border: 1px solid rgba(0,0,0,0.1);
}
.hero-subtitle::before { left: 18px;  background: var(--tape-yellow); transform: rotate(-5deg); }
.hero-subtitle::after  { right: 18px; background: var(--tape-pink);   transform: rotate(4deg); }


.hero-decoration { display: none; }

.hero-animal {
    position: relative; bottom: -10px;
    flex-shrink: 0;
    --rot: 3deg;
    transform: rotate(var(--rot));
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.3));
    animation: float 4s ease-in-out infinite;
    transition: all 0.3s var(--bounce);
}
.hero-animal img { width: 185px; height: 185px; object-fit: contain; }
.hero-animal:hover { animation: wobble 0.5s ease infinite; transform: scale(1.1) rotate(-5deg); cursor: grab; }

.section-title {
    font-family: var(--font-handwrite);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--ink);
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    border: 3px solid var(--ink);
    padding: 8px 28px;
    background: var(--paper-warm);
    box-shadow: var(--shadow-photo);
}
/* Scotch sur le titre */
.section-title::before {
    content: '';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 70px; height: 16px;
    background: var(--tape-yellow);
    border: 1px solid rgba(0,0,0,0.12);
}
.section-title::after { display: none; }
.filters, .creations-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 44px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 7px 18px;
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-handwrite);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow-sticker);
    transform: rotate(var(--rot, 0deg));
    transition: all 0.2s var(--bounce);
}
.filter-btn:nth-child(1) { --rot: -2deg; }
.filter-btn:nth-child(2) { --rot:  1deg; }
.filter-btn:nth-child(3) { --rot: -1deg; }
.filter-btn:nth-child(4) { --rot:  2deg; }
.filter-btn:nth-child(5) { --rot: -1.5deg; }
.filter-btn:nth-child(6) { --rot:  1.5deg; }

.filter-btn:hover { transform: rotate(0deg) translateY(-5px); box-shadow: var(--shadow-lift); background: var(--sticker-sage); }
.filter-btn.active {
    background: var(--sticker-peach);
    color: var(--ink);
    border-color: var(--ink);
    transform: rotate(0deg) scale(1.04);
    box-shadow: var(--shadow-lift);
}

.projects-section {
    padding: 90px 0 110px;
    background: var(--paper-main);
    position: relative;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent 0px, transparent 27px,
            rgba(180,160,120,0.22) 27px, rgba(180,160,120,0.22) 28px
        );
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 36px;
    position: relative; z-index: 1;
}

.project-card {
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    border-radius: 0;
    overflow: visible;
    box-shadow: var(--shadow-photo);
    transition: all 0.25s var(--bounce);
    transform: rotate(var(--card-rot, 0deg));
    animation: bounce-in 0.6s var(--bounce) backwards;
    cursor: pointer;
    position: relative;
}
.project-card::before {
    content: '';
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%) rotate(var(--tape-rot, -2deg));
    width: 64px; height: 18px;
    background: var(--tape-col, var(--tape-yellow));
    border: 1px solid rgba(0,0,0,0.12);
    z-index: 10;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.project-card:nth-child(1)  { --card-rot: -2deg;   --tape-rot: -4deg;  --tape-col: var(--tape-yellow); animation-delay:.05s; }
.project-card:nth-child(2)  { --card-rot:  1.5deg; --tape-rot:  3deg;  --tape-col: var(--tape-pink);   animation-delay:.10s; }
.project-card:nth-child(3)  { --card-rot: -1deg;   --tape-rot: -2deg;  --tape-col: rgba(184,216,176,0.65); animation-delay:.15s; }
.project-card:nth-child(4)  { --card-rot:  2deg;   --tape-rot:  4deg;  --tape-col: var(--tape-blue);   animation-delay:.20s; }
.project-card:nth-child(5)  { --card-rot: -1.5deg; --tape-rot: -3deg;  --tape-col: rgba(245,196,161,0.65); animation-delay:.25s; }
.project-card:nth-child(6)  { --card-rot:  1deg;   --tape-rot:  2deg;  --tape-col: var(--tape-yellow); animation-delay:.30s; }
.project-card:nth-child(7)  { --card-rot: -2.5deg; --tape-rot: -4deg;  --tape-col: var(--tape-pink);   animation-delay:.10s; }
.project-card:nth-child(8)  { --card-rot:  1.8deg; --tape-rot:  3deg;  --tape-col: rgba(205,184,240,0.6); animation-delay:.15s; }
.project-card:nth-child(9)  { --card-rot: -0.8deg; --tape-rot: -2deg;  --tape-col: rgba(184,216,176,0.65); animation-delay:.05s; }
.project-card:nth-child(10) { --card-rot:  2.2deg; --tape-rot:  4deg;  --tape-col: var(--tape-blue);   animation-delay:.10s; }

.project-card.hidden { display: none; }

.project-card:hover {
    transform: rotate(0deg) translateY(-14px) scale(1.03);
    box-shadow: var(--shadow-lift);
    z-index: 5;
}

.project-image {
    position: relative; width: 100%; height: 220px;
    overflow: hidden; border-bottom: 2px solid var(--ink);
}
.project-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: saturate(0.85) sepia(0.1);
}
.project-card:hover .project-image img { transform: scale(1.07); filter: saturate(1.05) sepia(0); }

.project-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.project-card:nth-child(4n+1) .project-overlay { background: rgba(184, 216, 176, 0.88); }  /* sauge */
.project-card:nth-child(4n+2) .project-overlay { background: rgba(244, 167, 192, 0.88); }  /* rose poudré */
.project-card:nth-child(4n+3) .project-overlay { background: rgba(245, 196, 161, 0.88); }  /* pêche */
.project-card:nth-child(4n+4) .project-overlay { background: rgba(249, 228, 160, 0.90); }  /* jaune miel */
.project-card:hover .project-overlay { opacity: 1; }

.view-more {
    font-family: var(--font-handwrite);
    font-size: 24px; font-weight: 700;
    color: var(--ink);
    border: 3px solid var(--ink);
    padding: 8px 20px;
    background: var(--paper-warm);
    box-shadow: var(--shadow-sticker);
    transform: rotate(-2deg) translateY(20px);
    transition: all 0.3s var(--bounce);
    display: inline-block;
}
.project-card:hover .view-more { transform: rotate(1deg) translateY(0); }

.project-info { padding: 18px 20px 22px; }
.project-title {
    font-family: var(--font-handwrite);
    font-size: 19px; font-weight: 700;
    margin-bottom: 12px; color: var(--ink); line-height: 1.35;
}
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    padding: 3px 12px;
    font-family: var(--font-typewriter);
    font-size: 12px; font-weight: 400;
    color: #2e2318;  /* toujours noir — la couleur JS ne peut pas l'écraser si !important n'est pas là */
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
    transform: rotate(var(--tag-rot, -0.5deg));
    display: inline-block;
    letter-spacing: 0.5px;
}
.tag:nth-child(1) { --tag-rot: -1deg; }
.tag:nth-child(2) { --tag-rot:  1deg; }
.tag:nth-child(3) { --tag-rot: -0.5deg; }

/* ============================================================
   CRÉATIONS
   ============================================================ */
.creations-section {
    padding: 90px 0 110px;
    background: var(--paper-warm);
    position: relative;
    border-top: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
}
/* Bande washi tape colorée */
.creations-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--sticker-yellow) 0px,  var(--sticker-yellow) 20px,
        var(--sticker-pink)   20px, var(--sticker-pink)   40px,
        var(--sticker-orange) 40px, var(--sticker-orange) 60px,
        var(--sticker-sky)    60px, var(--sticker-sky)    80px,
        var(--sticker-lilac)  80px, var(--sticker-lilac) 100px
    );
}

.creations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.creation-card {
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    border-radius: 0;
    overflow: visible;
    box-shadow: var(--shadow-photo);
    transition: all 0.25s var(--bounce);
    cursor: pointer;
    animation: bounce-in 0.6s var(--bounce) backwards;
    transform: rotate(var(--cc-rot, 0deg));
    position: relative;
}
.creation-card:nth-child(1) { --cc-rot: -1.5deg; animation-delay:.05s; }
.creation-card:nth-child(2) { --cc-rot:  1deg;   animation-delay:.10s; }
.creation-card:nth-child(3) { --cc-rot: -0.8deg; animation-delay:.15s; }
.creation-card.hidden { display: none; }
.creation-card:hover {
    transform: rotate(0deg) translateY(-14px) scale(1.03);
    box-shadow: var(--shadow-lift);
    z-index: 5;
}

.creation-image {
    position: relative; width: 50%; height: 100px;
    overflow: hidden; border-bottom: 2px solid var(--ink);
}
.creation-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
    filter: saturate(0.85) sepia(0.1);
}
.creation-card:hover .creation-image img { transform: scale(1.07); filter: saturate(1.05) sepia(0); }

.creation-text-card {
    background-color: var(--paper-warm);
    background-image: repeating-linear-gradient(
        0deg, transparent 0px, transparent 24px,
        rgba(180,160,120,0.3) 24px, rgba(180,160,120,0.3) 25px
    );
    display: flex; align-items: center; justify-content: center;
}
.creation-text-preview { padding: 24px; text-align: center; z-index: 1; }
.creation-text-icon { font-size: 30px; display: block; margin-bottom: 8px; }
.creation-text-icon::before { content: '🪶'; }
.creation-text-excerpt {
    color: var(--pencil); font-family: "Times New Roman", Times, serif;
    font-style: italic; font-size: 15px; line-height: 1.7;
}

.creation-overlay { position: absolute; top: 8px; left: 8px; z-index: 2; }
.creation-category {
    font-family: var(--font-typewriter); font-size: 12px;
    padding: 3px 12px;
    background: var(--sticker-peach); color: var(--ink);
    border: 2px solid var(--ink); border-radius: 0;
    box-shadow: var(--shadow-sticker);
    transform: rotate(-2deg); display: inline-block;
}

.creation-info { padding: 16px 20px 20px; }
.creation-title { font-family: var(--font-handwrite); font-size: 18px; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.creation-desc { font-family: var(--font-typewriter); font-size: 13px; color: var(--pencil); }


.creation-card--image {
    background: none;
    border: none;
    box-shadow: none;
    overflow: visible;
    padding: 0;
    cursor: default;
    grid-column: 1 / -1;
}
.creation-card--image::before { display: none; }

.filmstrip-img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}
.creation-card--image:hover .filmstrip-img {
    transform: scale(1.03);
}

.creation-card--texte {
    cursor: pointer;
}

.creation-text-preview-card {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 180px;
    justify-content: center;
    background: var(--paper-warm);
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 24px,
        rgba(180,160,120,0.3) 24px, rgba(180,160,120,0.3) 25px
    );
    transition: all 0.25s var(--bounce);
}
.creation-card--texte:hover .creation-text-preview-card {
    background-color: var(--paper-aged);
}

.creation-text-icon { font-size: 32px; }

.creation-text-excerpt {
    font-family: var(--font-handwrite);
    font-style: italic;
    font-size: 15px;
    color: var(--pencil);
    line-height: 1.7;
    text-align: center;
}

.creation-text-read {
    font-family: var(--font-handwrite);
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-red);
    padding: 4px 14px;
    border: 2px solid var(--ink-red);
    transition: all 0.2s var(--bounce);
    display: inline-block;
}
.creation-card--texte:hover .creation-text-read {
    background: var(--ink-red);
    color: var(--paper-warm);
    transform: rotate(-1deg) scale(1.05);
}

.modal-content--parchment {
    background: #fdf6e3;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent 0px, transparent 31px,
            rgba(160,130,80,0.25) 31px, rgba(160,130,80,0.25) 32px
        ),
        linear-gradient(90deg,
            transparent 62px,
            rgba(200,80,80,0.18) 62px, rgba(200,80,80,0.18) 64px,
            transparent 64px
        );
    border: 3px solid #8b6914;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.3), inset 0 0 40px rgba(180,140,60,0.1);
    font-family: var(--font-handwrite);
    max-width: 680px;
}

[data-theme="dark"] .modal-content--parchment {
    background-color: #1e1a0e;
    border-color: #6a5010;
}

/* le scotch du parchemin */
.modal-content--parchment::before {
    background: rgba(200,170,80,0.6);
    border-color: rgba(140,100,20,0.3);
}

#textModalContent {
    padding: 10px 20px 20px 80px;
}

.text-modal-title {
    font-family: var(--font-handwrite);
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    transform: rotate(-1deg);
    display: inline-block;
}

.text-modal-date {
    font-family: var(--font-typewriter);
    font-size: 12px;
    color: var(--ink-red);
    margin-bottom: 28px;
    display: block;
}

.text-modal-body {
    font-family: var(--font-handwrite);
    font-size: 18px;
    color: var(--ink);
    line-height: 32px; /* aligne sur les lignes du fond */
    white-space: pre-wrap;
}

.timeline-section {
    padding: 90px 0 110px;
    background: var(--paper-main);
    position: relative;
    background-image:
        repeating-linear-gradient(
            0deg, transparent 0px, transparent 27px,
            rgba(180,160,120,0.22) 27px, rgba(180,160,120,0.22) 28px
        );
}
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 26px; top: 0; bottom: 0;
    width: 0;
    border-left: 3px dashed rgba(26,18,8,0.35);
}

.timeline-item {
    position: relative; padding-left: 72px; margin-bottom: 42px;
    opacity: 0; animation: stamp-in 0.7s var(--bounce) forwards;
}

.timeline-dot {
    position: absolute; left: 14px; top: 10px;
    width: 26px; height: 26px;
    background: var(--dot-col, var(--sticker-pink));
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: var(--shadow-sticker);
    transform: rotate(45deg);
}
.timeline-item:nth-child(1) .timeline-dot { --dot-col: var(--sticker-sage);   }
.timeline-item:nth-child(2) .timeline-dot { --dot-col: var(--sticker-pink);   }
.timeline-item:nth-child(3) .timeline-dot { --dot-col: var(--sticker-yellow); }
.timeline-item:nth-child(4) .timeline-dot { --dot-col: var(--sticker-peach);  }
.timeline-item:nth-child(5) .timeline-dot { --dot-col: var(--sticker-lilac);  }

.timeline-content {
    background: var(--paper-warm);
    padding: 20px 24px;
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: var(--shadow-photo);
    transition: all 0.25s var(--bounce);
    transform: rotate(-0.5deg);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute; top: -10px; right: 24px;
    width: 50px; height: 14px;
    background: var(--tape-yellow);
    border: 1px solid rgba(0,0,0,0.1);
    transform: rotate(3deg);
}
.timeline-item:hover .timeline-content {
    transform: translateX(6px) rotate(0deg);
    box-shadow: var(--shadow-lift);
    border-color: var(--ink-red);
}

.timeline-date {
    font-family: var(--font-typewriter); font-size: 13px;
    color: var(--ink-red); display: inline-block;
    background: rgba(192,57,43,0.1);
    border: 1px solid var(--ink-red);
    padding: 2px 10px; margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.timeline-title { font-family: var(--font-handwrite); font-size: 21px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.timeline-description { font-family: var(--font-typewriter); font-size: 14px; color: var(--pencil); line-height: 1.65; }

.section-deco { position: absolute; z-index: 2; pointer-events: none; }
.section-deco img {
    width: 140px; height: 140px; object-fit: contain;
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.35));
    transition: all 0.3s var(--bounce);
    animation: float 5s ease-in-out infinite;
}
.section-deco img:hover {
    pointer-events: all; cursor: grab;
    animation: shake 0.4s ease infinite; transform: scale(1.15);
}
.section-deco--projets   { top: 55px;  right: 1150px; }
.section-deco--creations { top: 110px; left: 55px; }
.section-deco--parcours  { top: 110px; right: 55px; }
.projects-section, .creations-section, .timeline-section { position: relative; }

.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,18,8,0.78); backdrop-filter: blur(2px);
}
.modal-content {
    position: relative;
    background: var(--paper-warm);
    border: 3px solid var(--ink);
    border-radius: 0;
    max-width: 900px; width: 90%; max-height: 85vh;
    overflow-y: auto; padding: 50px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.3);
    transform: scale(0.9) rotate(-3deg);
    transition: all 0.4s var(--bounce);
}
.modal.active .modal-content { transform: scale(1) rotate(-0.5deg); }
/* Scotch modal */
.modal-content::before {
    content: '';
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 90px; height: 18px;
    background: var(--tape-yellow);
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    background: var(--sticker-pink); color: var(--ink);
    border: 2px solid var(--ink); border-radius: 0;
    font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s var(--bounce);
    box-shadow: var(--shadow-sticker);
}
.modal-close:hover { transform: rotate(90deg) scale(1.1); box-shadow: var(--shadow-lift); }

/* ── PROJECT DETAIL ── */
.project-detail-header { margin-bottom: 24px; }
.project-detail-image {
    width: 100%; height: 260px; object-fit: cover;
    border: 2px solid var(--ink); border-radius: 0;
    margin-bottom: 24px;
    box-shadow: var(--shadow-photo);
    filter: saturate(0.9) sepia(0.08);
}
.project-detail-title { font-family: var(--font-handwrite); font-size: 30px; font-weight: 700; margin-bottom: 14px; color: var(--ink); line-height: 1.3; }
.project-detail-tags { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.project-detail-section { margin-bottom: 26px; }
.project-detail-section h3 {
    font-family: var(--font-handwrite); font-size: 20px; font-weight: 700;
    margin-bottom: 12px; color: var(--ink);
    border-bottom: 2px solid var(--ink); padding-bottom: 4px; display: inline-block;
}
.project-detail-section p { font-family: var(--font-typewriter); font-size: 14px; color: var(--pencil); line-height: 1.85; margin-bottom: 10px; }
.project-detail-section ul { list-style: none; padding: 0; }
.project-detail-section li {
    font-family: var(--font-typewriter); font-size: 14px; color: var(--pencil);
    padding: 7px 0 7px 26px; position: relative; line-height: 1.65;
    border-bottom: 1px dashed var(--paper-lines);
}
.project-detail-section li::before { content: '→'; position: absolute; left: 0; color: var(--ink-red); font-family: var(--font-handwrite); font-size: 18px; }

.project-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr));
    gap: 16px; margin-bottom: 24px; padding: 20px;
    background: var(--paper-aged); border: 2px dashed var(--ink);
}
.project-info-item { display: flex; flex-direction: column; gap: 4px; }
.project-info-label { font-family: var(--font-typewriter); font-size: 12px; color: var(--ink-red); text-transform: uppercase; letter-spacing: 1.5px; }
.project-info-value { font-family: var(--font-handwrite); font-size: 18px; font-weight: 600; color: var(--ink); }

.project-links { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.project-link {
    padding: 9px 22px; color: var(--ink); text-decoration: none;
    font-family: var(--font-handwrite); font-size: 16px; font-weight: 700;
    border: 2px solid var(--ink); border-radius: 0;
    box-shadow: var(--shadow-sticker); transform: rotate(-1deg);
    display: inline-block; transition: all 0.2s var(--bounce);
}
.project-link:nth-child(1) { background: var(--sticker-pink);   }
.project-link:nth-child(2) { background: var(--sticker-yellow); }
.project-link:nth-child(3) { background: var(--sticker-sage);   }
.project-link:hover { transform: rotate(2deg) translateY(-5px); box-shadow: var(--shadow-lift); }
.project-link:nth-child(3):hover { color: var(--ink); }

/* ── ABOUT MODAL ── */
.about-grid { display: grid; gap: 32px; }
.about-section h3 {
    font-family: var(--font-handwrite); font-size: 24px; font-weight: 700;
    margin-bottom: 16px; color: var(--ink); display: inline-block;
    background: linear-gradient(transparent 55%, rgba(245,216,0,0.55) 55%);
    padding: 0 4px;
}
.about-section p { font-family: var(--font-typewriter); font-size: 14px; color: var(--pencil); line-height: 1.85; }

.education-item {
    padding: 16px 20px; background: var(--paper-aged);
    border: 2px solid var(--ink); border-radius: 0; margin-bottom: 12px;
    box-shadow: var(--shadow-sticker); transform: rotate(-0.4deg);
    transition: all 0.2s var(--bounce);
}
.education-item:hover { transform: translateX(8px) rotate(0deg); box-shadow: var(--shadow-lift); }
.education-item h4 { font-family: var(--font-handwrite); font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.education-year { font-family: var(--font-typewriter); font-size: 13px; color: var(--ink-red); margin-bottom: 3px; }
.education-school { font-family: var(--font-typewriter); font-size: 13px; color: var(--pencil); }

.skills-grid { display: grid; gap: 16px; }
.skill-item { display: flex; flex-direction: column; gap: 6px; }
.skill-name { font-family: var(--font-handwrite); font-size: 16px; font-weight: 600; color: var(--ink); }
.skill-bar { height: 14px; background: var(--paper-aged); border: 2px solid var(--ink); border-radius: 0; overflow: hidden; }
.skill-progress { height: 100%; border-radius: 0; transition: width 1.2s var(--bounce); }
.skill-item:nth-child(4n+1) .skill-progress { background: var(--sticker-blue);  }
.skill-item:nth-child(4n+2) .skill-progress { background: var(--sticker-pink);  }
.skill-item:nth-child(4n+3) .skill-progress { background: var(--sticker-sage);  }
.skill-item:nth-child(4n+4) .skill-progress { background: var(--sticker-peach); }

.contact-info { display: flex; flex-direction: column; gap: 10px; }
.contact-info p { font-family: var(--font-typewriter); font-size: 14px; color: var(--ink); }
.contact-info strong { color: var(--ink-red); }

.footer {
    background: var(--ink); color: var(--paper-warm);
    padding: 26px 0; text-align: center;
    border-top: 3px solid var(--ink);
}
.footer p { font-family: var(--font-typewriter); font-size: 13px; opacity: 0.75; line-height: 1.9; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper-aged); border-left: 1px solid var(--paper-lines); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 2px solid var(--paper-aged); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-red); }
::selection { background: var(--sticker-yellow); color: var(--ink); }

@media (max-width: 768px) {
    .nav { gap: 12px; }
    .nav-link { font-size: 18px; }
    .btn-about { font-size: 16px; padding: 7px 16px; }
    .hero { padding: 120px 0 60px; }
    .hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
    .hero-animal { align-self: center; }
    .projects-grid { grid-template-columns: 1fr; }
    .creations-grid { grid-template-columns: 1fr; }
    .timeline::before { left: 12px; }
    .timeline-item { padding-left: 52px; }
    .timeline-dot { left: 0; width: 22px; height: 22px; }
    .modal-content { padding: 30px 18px; }
    .project-detail-title { font-size: 24px; }
    .filters, .creations-filters { gap: 8px; }
    .filter-btn { padding: 7px 14px; font-size: 14px; }
    .section-deco { display: none; }
}
@media (max-width: 480px) {
    .header .container { flex-direction: column; gap: 10px; }
    .nav { flex-wrap: wrap; justify-content: center; }
    .hero-title { font-size: 38px; }
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    font-family: var(--font-handwrite);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    padding: 5px 16px;
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: var(--shadow-sticker);
    transform: rotate(var(--sk-rot, 0deg));
    transition: all 0.2s var(--bounce);
    display: inline-block;
    cursor: default;
}

.skill-tag:hover {
    transform: rotate(0deg) translateY(-4px) scale(1.06);
    box-shadow: var(--shadow-lift);
}

/* couleurs appliquées dynamiquement par random-colors.js */

.certifs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.certif-item {
    background: var(--paper-warm);
    border: 2px solid var(--ink);
    padding: 10px 10px 28px;
    box-shadow: var(--shadow-photo);
    transform: rotate(var(--certif-rot, 0deg));
    transition: all 0.25s var(--bounce);
    position: relative;
}

.certif-item::before {
    content: '';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%) rotate(var(--certif-tape, -2deg));
    width: 50px; height: 14px;
    background: var(--certif-tape-col, var(--tape-yellow));
    border: 1px solid rgba(0,0,0,0.1);
}

.certif-item:nth-child(1) { --certif-rot: -1.5deg; --certif-tape: -3deg;  --certif-tape-col: var(--tape-yellow); }
.certif-item:nth-child(2) { --certif-rot:  1.2deg; --certif-tape:  2deg;  --certif-tape-col: var(--tape-pink);   }
.certif-item:nth-child(3) { --certif-rot: -0.8deg; --certif-tape: -2deg;  --certif-tape-col: rgba(184,216,176,0.65); }
.certif-item:nth-child(4) { --certif-rot:  2deg;   --certif-tape:  3deg;  --certif-tape-col: var(--tape-blue);   }

.certif-item:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lift);
    z-index: 3;
}

.certif-item img {
    width: 100%;
    display: block;
    filter: saturate(0.85) sepia(0.08);
    border: 1px solid var(--paper-lines);
}

@media (max-width: 500px) {
    .certifs-grid { grid-template-columns: 1fr; }
}