* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-bg: #f7f6f4;
    --main-bg: #f7f6f4;
    --text: #333333;
    --text-light: #666666;
    --border: #cfc9c5; /* légèrement plus foncé pour plus de contraste */
    --cursor-url: images/note2.cur; /* placez votre curseur personnalisé ici */
    --accent: #000000;
    --sidebar-width: clamp(270px, 27%, 360px);
    --carousel-height: 70vh;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: url("images/note2.cur") 16 16, url("images/note2.png") 16 16, auto;
}

/* Amélioration du toucher sur mobile */
a, button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-120%);
    background: #111;
    color: #fff;
    padding: 12px 18px;
    z-index: 1000;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid #fff;
    outline-offset: 4px;
}

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

.lang-btn {
    border: none;
    background: transparent;
    padding: 6px 8px;
    cursor: pointer;
    color: var(--text);
    font-weight: 500;
    min-width: 44px;
    min-height: 44px;
}


/* Sidebar fixe à gauche */
.sidebar {
    width: var(--sidebar-width);
    max-width: 400px;
    min-width: 300px;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid var(--border);
    z-index: 2;
}

.sidebar-content {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-height: 100%;
    justify-content: space-between;
}

/* Sidebar bottom: contact + language switch aligned */
.sidebar-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.contact-links { display: flex; flex-direction: column; gap: 6px; }

.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-switch .lang-sep { color: var(--text-light); }

.lang-btn[aria-pressed="true"] {
    font-weight: 700;
    color: var(--accent);
    text-decoration: underline;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Profile section */
.profile {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}

.profile h1 {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--accent);
}

.brand-logo {
    max-width:90px;
    width: 100%;
    height: auto;
    display: block;
}

/* Bio section */
.bio h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent);
}

.bio p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 15px;
}

.read-more {
    font-size: 14px;
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #111;
    display: inline-block;
    padding-bottom: 2px;
    transition: opacity 0.3s, color 0.3s;
}

.read-more:hover,
.read-more:focus-visible {
    opacity: 0.85;
    color: var(--accent);
}

/* Contact section */
.contact h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
}

.contact a {
    font-size: 14px;
    color: #111;
    text-decoration: none;
    display: block;
    transition: color 0.3s, opacity 0.3s;
}

.contact a:hover,
.contact a:focus-visible {
    color: var(--accent);
    opacity: 0.9;
}

/* Main content area */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: var(--main-bg);
    padding: 0;
    position: relative;
    z-index: 1;
}

/* On very wide screens, optimize space usage */
@media (min-width: 1800px) {
    :root {
        --sidebar-width: 400px;
    }
}

/* Projects grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    padding: 0;
}

/* Responsive grid for larger screens */
@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

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

.project-item {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--main-bg);
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 100%;
    height: var(--carousel-height);
    max-height: 80vh; /* responsive cap */
    background: #f7f6f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    display: block;
    z-index: 1;
}

.carousel-image.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Lightbox / full-screen image overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}
.lightbox-overlay.active { display: flex; }
.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10003;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}
.lightbox-fullscreen {
    position: fixed;
    top: 18px;
    right: 72px;
    z-index: 10003;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* Custom cursor for interactive elements (falls back to pointer) */
.carousel, .carousel-btn, .carousel-dot, .project-image img, a, button {
    cursor: url("images/cursor.png") 16 16, pointer;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: white;
}

/* Single image (no carousel) */
.project-image {
    width: 100%;
    min-height: 400px;
    max-height: 700px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    max-width: 90%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Project info overlay */
.project-info {
    padding: 40px;
    background: var(--main-bg);
    max-width: 1400px;
    margin: 0 auto;
    width: min(100%, 1400px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--accent);
    line-height: 1.12;
    text-align: left;
    width: 100%;
    max-width: 1200px;
}

.project-content-grid {
    display: grid;
    grid-template-columns: minmax(360px, 2fr) minmax(320px, 1fr);
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 34px;
}

.project-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-video-block {
    width: 100%;
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    width: 100%;
    max-width: 320px;
    border-radius: 36px;
    background: #111;
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
    position: relative;
    width: 100%;
    padding-top: calc(16 / 9 * 100%);
    border-radius: 26px;
    overflow: hidden;
    background: #000;
}

.phone-screen iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-description {
    font-size: 16px;
    color: var(--text);
    line-height: 1.9;
    margin: 0;
    text-align: left;
}

.project-description p,
.project-description ol,
.project-description ol li {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
}

.project-description p {
    margin: 0 0 22px;
}

.project-description ol {
    list-style-type: decimal;
    margin: 0 0 22px 1.6em;
    padding-left: 0;
    list-style-position: outside;
}

.project-description ol li {
    margin: 0 0 14px;
    padding-left: 0;
}

.exhibitions {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.exhibitions h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent);
}

.exhibitions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exhibitions li {
    font-size: 16px;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

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

.exhibitions li strong {
    font-weight: 500;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag {
    padding: 5px 12px;
    background: var(--sidebar-bg);
    color: var(--text);
    font-size: 12px;
    border-radius: 3px;
}

/* Modal Drawer */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-drawer {
    position: fixed;
    top: 0;
    left: -500px;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: var(--main-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: left 0.3s ease;
    z-index: 1001;
}

.modal-overlay.active .modal-drawer {
    left: 0;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--sidebar-bg);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    color: var(--accent);
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--border);
}

.modal-content {
    padding: 60px 40px 40px;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--accent);
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 500;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent);
}

.modal-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 1400px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 30%;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    :root {
        --sidebar-width: 100%;
    }

    .sidebar {
        position: relative;
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .sidebar-content {
        padding: 30px 20px;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
    }
    
    .project-info {
        padding: 40px 20px;
    }
    
    .project-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .project-description {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .project-content-grid {
        grid-template-columns: 1fr;
    }
    
    .project-video-block {
        justify-content: center;
    }
    
    .exhibitions h4 {
        font-size: 16px;
    }
    
    .exhibitions li {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .carousel,
    .project-image {
        min-height: 250px;
        max-height: 400px;
    }
    
    /* Boutons carrousel plus grands pour touch */
    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    /* Dots plus grands pour touch */
    .carousel-dot {
        width: 12px;
        height: 12px;
    }
    
    /* Modal drawer full width on mobile */
    .modal-drawer {
        max-width: 100%;
        left: -100%;
    }
    
    .modal-content {
        padding: 60px 25px 40px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .modal-content h3 {
        font-size: 16px;
    }
    
    .modal-content p {
        font-size: 14px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .sidebar-content {
        padding: 20px 15px;
    }
    
    .profile h1 {
        font-size: 20px;
    }
    
    .bio h2 {
        font-size: 15px;
    }
    
    .bio p {
        font-size: 13px;
    }
    
    .project-info {
        padding: 40px 15px;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .project-description {
        font-size: 14px;
    }
    
    :root { --carousel-height: 100vh; }

    .carousel {
        height: var(--carousel-height);
        max-height: 60vh;
    }

    .carousel-images {
        height: 100%;
    }

    .carousel-image,
    .project-image img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        left: 0;
        top: 0;
        transform: none;
        position: absolute;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
}