/* Thèmes ---------------------------------------------------------------- */

body.dark {
    --bg: #0f0f11;
    --text: #e9e9e9;
    --card-bg: #1a1a1d;
    --accent: #3a7afe;
}

body.light {
    --bg: #fdf6e3;
    --text: #586e75;
    --card-bg: #eee8d5;
    --accent: #268bd2;
}

/* Global styling -------------------------------------------------------- */

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* Header ---------------------------------------------------------------- */

header {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.subtitle {
    margin-top: -5px;
    font-size: 1rem;
    opacity: 0.85;
}

#themeToggle {
    background: var(--card-bg);
    color: var(--text);
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

#themeToggle:hover {
    transform: scale(1.1);
}

/* Main layout ----------------------------------------------------------- */

section {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* espace subtil entre les blocs */
    margin-bottom: 40px;
}

/* Blocs ----------------------------------------------------------------- */

.side-block {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px #00000033;
    flex: 1 1 300px; /* flexible et minimum 300px */
    min-height: 300px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-block:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px #00000055;
}

.side-block h2 {
    margin-top: 0;
    color: var(--accent);
}

/* Photo ----------------------------------------------------------------- */

.photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.photo-container img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--accent);
    box-shadow: 0 6px 18px #00000044;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px #00000055;
}

/* Réduction du bloc "À propos de moi" ---------------------------------- */

.about-block {
    min-height: 250px;
}

/* Liens ----------------------------------------------------------------- */

a {
    color: var(--accent);
    text-decoration: none;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1200px) {
    .photo-container img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 900px) {
    section {
        flex-direction: column;
        align-items: center;
    }

    .side-block {
        width: 90%;
    }

    .photo-container {
        margin-bottom: 20px;
    }
}
