/* style.css */

/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #0000cd;
    --secondary-color: #00008b;
    --accent-color: #ff0000;
    --imperial-red: #ff0000;
    --bg-light: #c0c0c0;
    --bg-lighter: #dfdfdf;
    --border-dark: #808080;
    --border-light: #ffffff;
    --text-primary: #000000;
    --text-secondary: #808080;
    --white-smoke: #f5f5f5;
    --silver: #c0c0c0;
    --sky-blue: #87ceeb;
    --shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
    --card-bg: #f0f0f0;
}

[data-theme="dark"] {
    --bg-light: #2d2d2d;
    --bg-lighter: #3d3d3d;
    --border-dark: #050932;
    --border-light: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --white-smoke: #2a2a2a;
    --card-bg: #333333;
}

/* ===== RESET GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, var(--sky-blue), #ffffff);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

/* ===== NAVBAR/NAVIGATION ===== */
.navbar {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-dark);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-logo {
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.navbar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.navbar-links li a,
.navbar-links li button {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: bold;
    background: var(--bg-light);
    border: 2px outset var(--border-light);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
}

.navbar-links li button {
    background: var(--bg-lighter);
}

.navbar-links li a:active,
.navbar-links li button:active {
    border-style: inset;
    background: var(--border-light);
}

.navbar-links li a:hover,
.navbar-links li button:hover {
    border: 2px inset var(--border-dark);
    transform: translateY(1px);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--sky-blue), #ffffff);
    border-bottom: 3px solid var(--border-dark);
    min-height: 500px;
}

.hero-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.8rem;
    background: var(--card-bg);
    border: 3px outset white;
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
    border-radius: 2px;
    box-shadow: 6px 6px 0px var(--border-dark);
}

[data-theme="dark"] .hero-left {
    background: rgba(45, 45, 45, 0.8);
}

.hero-title h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 2px;
}

.hero-title h2 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: normal;
    font-style: italic;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.8rem;
}

.hero-bio {
    margin: 1rem 0;
}

.hero-bio p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.hero-bio p em {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1rem;
}

.hero-contact {
    margin: 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    padding: 0.4rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.7rem;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
    min-width: 20px;
}

.hero-socials {
    display: flex;
    gap: 0.8rem;
    margin: 1rem 0;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 2px outset var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.social-icon:hover {
    border-style: inset;
    background: var(--border-light);
    color: var(--accent-color);
}

.hero-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== BUTTONS ===== */
.btns {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-light);
    border: 2px outset var(--border-light);
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.9rem;
    border-radius: 2px;
    user-select: none;
}

.btn:hover {
    border: 2px outset var(--border-light);
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
}

.btn:active {
    border-style: inset;
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(180deg, #1084d7, #000d7d);
    color: white;
    border: 2px outset rgba(255, 255, 255, 0.6);
    border-bottom-color: #000033;
    border-right-color: #000033;
    font-weight: bold;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #1a90e8, #0015a0);
}

.btn-primary:active {
    border-style: inset;
}

.btn-secondary {
    background: var(--bg-light);
    border: 2px outset var(--border-light);
}

/* ===== PROFILE PHOTO FRAME ===== */
.profile-photo-frame {
    width: 340px;
    height: 480px;
    border: 6px solid var(--secondary-color);
    background: linear-gradient(135deg, var(--sky-blue), #e6f2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 12px 12px 0px var(--border-dark), 18px 18px 30px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.profile-photo-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
    border-radius: 8px;
    box-shadow: inset 3px 3px 0px rgba(255, 255, 255, 0.9), inset -3px -3px 0px rgba(0, 0, 0, 0.4);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid white;
}

/* ===== SECTIONS & TITLES ===== */
.section-title {
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(90deg, #000080, #0000cd);
    color: white;
    border: 2px outset rgba(255, 255, 255, 0.5);
    border-bottom-color: #000033;
    border-right-color: #000033;
    border-radius: 2px;
    box-shadow: 4px 4px 0px var(--border-dark);
    font-family: 'MS Sans Serif', 'Arial', sans-serif;
}

.section-title i {
    font-size: 1.8rem;
}

/* ===== CONTAINER & SECTIONS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px outset white;
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
    border-radius: 2px;
    box-shadow: 4px 4px 0px var(--border-dark);
}

[data-theme="dark"] section {
    background: rgba(45, 45, 45, 0.5);
}

/* ===== ABOUT SECTION ===== */
.about {
    line-height: 1.8;
    font-size: 1.05rem;
    padding: 2rem 1.5rem;
}

.about p {
    margin-bottom: 1rem;
    text-align: justify;
    font-style: italic;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

/* ===== CARDS STYLING ===== */
.card {
    background: var(--card-bg);
    border: 2px outset white;
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
    border-radius: 2px;
    padding: 1.2rem;
    box-shadow: 3px 3px 0px var(--border-dark);
    transition: all 0.3s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px var(--border-dark);
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-card {
    background: var(--card-bg);
    border: 2px outset white;
    border-bottom-color: var(--border-dark);
    border-right-color: var(--border-dark);
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--border-dark);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px var(--border-dark);
    border-bottom-color: var(--accent-color);
    border-right-color: var(--accent-color);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-dark);
}

.project-title {
    font-weight: bold;
    font-size: 1.2rem;
    padding: 1rem 1rem 0.5rem;
    color: var(--secondary-color);
}

.project-desc {
    padding: 0 1rem 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.project-tech {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid var(--border-dark);
}

.project-tech i {
    font-size: 1.5rem;
}

/* ===== CONTACT CARDS ===== */
.contact-cards {
    margin-bottom: 2.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-light);
    border-top: 3px solid var(--border-dark);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 0px rgba(0, 0, 0, 0.1);
}

.footer div {
    margin-bottom: 0.8rem;
}

.footer strong {
    color: var(--secondary-color);
}

/* ===== QR CODE ===== */
#qr-code {
    width: 120px;
    height: 120px;
    border: 3px solid var(--border-dark);
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

/* ===== UTILITIES ===== */
a {
    color: inherit;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.project-card {
    animation: slideIn 0.5s ease-out;
}

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

/* Tablets (768px et moins) */
@media (max-width: 768px) {
    .navbar {
        padding: 0.7rem;
    }

    .navbar-logo {
        font-size: 1.2rem;
    }

    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-links {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-light);
        border-bottom: 2px solid var(--border-dark);
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .navbar-links.active {
        display: flex;
        max-height: 500px;
    }

    .hero {
        padding: 1.5rem 1rem;
        min-height: auto;
    }

    .hero-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-left {
        padding: 1rem;
    }

    .hero-title h1 {
        font-size: 1.8rem;
    }

    .hero-title h2 {
        font-size: 0.85rem;
    }

    .profile-photo-frame {
        width: 240px;
        height: 320px;
        margin: 0 auto;
    }

    .hero-right {
        justify-content: center;
    }

    .section-title {
        font-size: 1.2rem;
        padding: 0.6rem;
    }

    .btns {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    section {
        padding: 1rem;
        margin: 1.5rem 0;
    }
}

/* Petits appareils mobiles (480px et moins) */
@media (max-width: 480px) {
    * {
        font-family: 'Arial', sans-serif;
    }

    .navbar {
        padding: 0.5rem;
    }

    .navbar-logo {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .hero {
        padding: 1rem 0.8rem;
        min-height: auto;
    }

    .hero-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-left {
        padding: 0.8rem;
        border-radius: 4px;
    }

    .hero-title h1 {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

    .hero-title h2 {
        font-size: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .hero-bio p {
        font-size: 0.85rem;
    }

    .contact-item {
        font-size: 0.8rem;
        padding: 0.3rem;
    }

    .hero-socials {
        gap: 0.6rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .profile-photo-frame {
        width: 180px;
        height: 240px;
        box-shadow: 5px 5px 0px var(--border-dark), 8px 8px 15px rgba(0, 0, 0, 0.15);
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin: 0.3rem;
    }

    .section-title {
        font-size: 1.1rem;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .section-title i {
        font-size: 1.4rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 150px;
    }

    section {
        padding: 0.8rem;
        margin: 1rem 0;
        border-radius: 3px;
    }

    .about p {
        text-align: left;
        font-size: 0.95rem;
    }

    .footer {
        padding: 1.5rem 0.8rem;
        font-size: 0.85rem;
    }

    #qr-code {
        width: 100px;
        height: 100px;
    }
}

/* Très petits écrans (320px) */
@media (max-width: 320px) {
    .hero-title h1 {
        font-size: 1.3rem;
    }

    .hero-title h2 {
        font-size: 0.7rem;
    }

    .hero-bio p {
        font-size: 0.8rem;
    }

    .profile-photo-frame {
        width: 160px;
        height: 200px;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1rem;
    }

    section {
        padding: 0.6rem;
        margin: 0.8rem 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
    }

    .navbar,
    .footer {
        display: none;
    }

    section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

