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

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #e5e7eb;
    color: #111827;
}

body {
    line-height: 1.5;
    background-color: transparent;
}

/* Liens */

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Conteneur principal */

.container {
    max-width: 1120px;
    margin: 1.5rem auto;
    padding: 1.5rem;
}

/* HEADER */

.site-header {
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 1.5rem;
    background-color: #f9fafb;
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-switch a {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #4b5563;
}

.lang-switch a.active {
    border-color: #2563eb;
    background-color: #e5edff;
    color: #1f2933;
}

/* LAYOUT */

.main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .main {
        grid-template-columns: 300px 1fr;
        align-items: flex-start;
    }
}

/* Cartes génériques (sidebar, sections, login, etc.) */

.profile-card,
.section,
.login-box {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* SIDEBAR (PROFILE) */

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #111827;
}

.profile-title {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

/* l'ancien .profile-summary n'est plus utilisé dans la colonne de gauche,
   mais on le garde au cas où, il ne gêne pas */
.profile-summary {
    font-size: 0.92rem;
    margin-bottom: 1rem;
    color: #374151;
}

.profile-info {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.profile-links {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.profile-links div {
    margin-bottom: 0.25rem;
}

/* SECTIONS */

.section {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

/* ITEMS (expériences, formations, projets, etc.) */

.item {
    margin-bottom: 0.75rem;
}

.item:last-child {
    margin-bottom: 0;
}

.item-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
}

.item-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

.item-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

.item-description {
    font-size: 0.9rem;
    margin-top: 0.35rem;
    color: #374151;
}

/* Badges */

.badges {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background-color: #f3f4f6;
    color: #374151;
}

/* Skills */

.skills-group {
    margin-bottom: 0.75rem;
}

.skills-group-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #111827;
}

/* CONTACT */

.contact-list {
    font-size: 0.9rem;
}

.contact-list div {
    margin-bottom: 0.25rem;
}

/* ADMIN (si tu as une interface admin) */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-nav {
    margin-bottom: 1rem;
}

.admin-nav a {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.admin-nav a.active {
    background-color: #e5edff;
    border-color: #2563eb;
    color: #1f2933;
}

/* FORMULAIRES */

form {
    margin-top: 0.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.1rem;
    color: #4b5563;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    font-size: 0.9rem;
}

textarea {
    min-height: 70px;
    resize: vertical;
}

input[type="submit"],
button {
    margin-top: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background-color: #2563eb;
    color: #f9fafb;
    font-size: 0.9rem;
    cursor: pointer;
}

input[type="submit"]:hover,
button:hover {
    background-color: #1d4ed8;
}

/* Messages */

.message {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.message.success {
    color: #15803d;
}

.message.error {
    color: #b91c1c;
}

/* LOGIN */

.login-box {
    max-width: 360px;
    margin: 5rem auto;
}

.login-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
    color: #111827;
}

/* MISC */

.mt-small {
    margin-top: 0.5rem;
}

/* ===========================
   EXPÉRIENCES & FORMATIONS REPLIABLES
   =========================== */

.section--collapsible-experiences .item,
.section--collapsible-education .item {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.6rem;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Header cliquable : flèche + texte sur la même ligne */
.section--collapsible-experiences .item-toggle,
.section--collapsible-education .item-toggle {
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr; /* flèche / contenu */
    column-gap: 0.5rem;
    align-items: center;
}

/* Bloc qui contient le texte (titre + dates) */
.section--collapsible-experiences .item-toggle-inner,
.section--collapsible-education .item-toggle-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
}

/* Chevron indicatif à gauche */
.section--collapsible-experiences .item-toggle::before,
.section--collapsible-education .item-toggle::before {
    content: "▼";
    font-size: 0.9rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    border: 1px solid #9ca3af;
    background-color: #f9fafb;
}

/* Flèche fermée */
.section--collapsible-experiences .item.collapsed .item-toggle::before,
.section--collapsible-education .item.collapsed .item-toggle::before {
    content: "▶";
}

/* Corps de l'item */
.section--collapsible-experiences .item-body,
.section--collapsible-education .item-body {
    margin-top: 0.4rem;
}

.section--collapsible-experiences .item.collapsed .item-body,
.section--collapsible-education .item.collapsed .item-body {
    display: none;
}

/* ===========================
   Groupes : langues, permis, extra
   =========================== */

#languages .item,
#driving-licenses .item,
#extra .item {
    margin-bottom: 0.6rem;
}

#languages .item-subtitle,
#driving-licenses .item-subtitle {
    font-size: 0.85rem;
}

/* Espacement vertical homogène dans la colonne de gauche (aside) */
aside > .profile-card,
aside > .section {
    margin-bottom: 1rem;
}