:root {
    /* Couleurs */
    --primary: #ff4646;
    --primary-hover: #e63939;
    --secondary: #2d3c8c;
    --secondary-hover: #24306f;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #dddddd;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ffcc00;
    --info: #007bff;
    --indigo: #3b4deb;
    --bg-success: #34c7591a;
    --bg-danger: #ff3b301a;
    --bg-warning: #ffcc001a;
    --bg-info: #007bff1a;

    /* Ombres */
    --shadow-color: #0000001a;
    --shadow-color-light: #0000000d;
    --shadow-sm: 0 1px 3px var(--shadow-color);
    --shadow-md: 0 4px 6px var(--shadow-color);
    --shadow-lg: 0 10px 15px var(--shadow-color);;

    /* Overlay */
    --overlay-dark: #00000080;
    --overlay-light: #00000066;

    /* Espacement */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Rayon */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ----- Thèmes ----- */

[data-theme="light"] {
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --text: var(--text-dark);
    --border-color: #dddddd;
    --medium-gray: #e0e0e0;
    --light-gray: #f5f5f5;
}

[data-theme="dark"] {
    --primary: #ff5a5a;
    --primary-hover: #ff7070;
    --secondary: #4e5dc2;
    --secondary-hover: #6170dd;

    /* Couleurs de fond */
    --bg: #1e1e24;
    --bg-secondary: #2a2a36;

    /* Texte et bordures */
    --text: #e8e8e8;
    --text-light: #ffffff;
    --border-color: #3d3d4d;

    /* Nuances de gris */
    --medium-gray: #494956;
    --light-gray: #33333e;
    --dark-gray: #9999aa;

    /* Fonds pour notifications */
    --bg-success: #34c75933;
    --bg-danger: #ff3b3033;
    --bg-warning: #ffcc0033;
    --bg-info: #007bff33;

    /* Couleurs de statut adaptées */
    --success: #40d66a;
    --danger: #ff4f45;
    --warning: #ffda33;
    --info: #3b98ff;

    /* Ombres et overlays */
    --shadow-color: #0000004d;
    --shadow-color-light: #00000033;
    --overlay-dark: #000000b3;
    --overlay-light: #00000080;
}

/* ----- Styles généraux ----- */

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
}

body {
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--secondary-hover);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--space-md);
    line-height: 1.25;
    font-weight: 600;
}

ul, ol {
    list-style: none;
    padding: 0;
}

/* ----- Affichage ----- */

.container {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
    background: var(--bg);
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    border-bottom: 2px solid var(--medium-gray);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xl);
    color: var(--secondary);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: left;
}

.nav {
    margin: var(--space-lg) 0;
    gap: var(--space-sm);
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.nav-left {
    gap: var(--space-sm);
    flex-wrap: wrap;
    display: flex;
}

.nav-right {
    gap: var(--space-sm);
    margin-left: auto;
    flex-wrap: wrap;
    display: flex;
}

/* ----- Boutons ----- */

.btn {
    gap: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 0.95rem;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn svg {
    height: 18px;
    width: 18px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--text-light);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-light);
}
.btn-secondary:hover {
    background: var(--secondary-hover);
    color: var(--text-light);
}

.btn-home {
    border: 1px solid var(--border-color);
    color: var(--text);
    background: var(--bg);
}
.btn-home:hover {
    background: var(--light-gray);
    color: var(--text);
}

.btn-cancel {
    background: var(--primary);
    color: var(--text-light);
}
.btn-cancel:hover {
    background: var(--primary-hover);
    color: var(--text-light);
}

.btn-back {
    border: 1px solid var(--border-color);
    color: var(--text);
    background: var(--bg);
}
.btn-back:hover {
    background: var(--light-gray);
    color: var(--text);
}

.btn-block {
    margin-bottom: var(--space-md);
    justify-content: center;
    width: 100%;
}

.btn-group {
    gap: var(--space-sm);
    display: flex;
}

/* ----- Formulaires ----- */

.form {
    gap: var(--space-lg);
    flex-direction: column;
    display: flex;
}

.form-row {
    gap: var(--space-md);
    grid-template-columns: 1fr 1fr;
    display: grid;
}

.form-title {
    margin-bottom: var(--space-md);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

.form-section {
    border-radius: var(--radius-md);
    background: var(--light-gray);
    padding: var(--space-lg);
}

.form-section-title {
    border-bottom: 1px solid var(--medium-gray);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-lg);
    color: var(--secondary);
    font-size: 1.2rem;
}

.form-group {
    gap: var(--space-xs);
    flex-direction: column;
    display: flex;
}

.form-group label {
    color: var(--dark-gray);
    gap: var(--space-xs);
    align-items: center;
    display: flex;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label svg {
    color: var(--secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: border 0.2s ease;
    font-size: 1rem;
    padding: 12px;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px var(--secondary-hover);
    outline: none;
}

.form-actions {
    margin-top: var(--space-lg);
    gap: var(--space-md);
    justify-content: flex-start;
    display: flex;
}

.form-options {
    margin-bottom: var(--space-lg);
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.form-help {
    color: var(--dark-gray);
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
}

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

.input-icon-wrapper {
    align-items: flex-start;
    position: relative;
    display: flex;
}

.input-icon {
    color: var(--dark-gray);
    pointer-events: none;
    position: absolute;
    inset: 12px 0 0 12px;
}

.input-icon-wrapper input,
.input-icon-wrapper textarea {
    padding-left: 44px !important;
}

.input-icon-wrapper textarea {
    overflow: hidden;
    resize: none;
    height: 40px;
    min-height: 40px;
    transition: height 0s;
}

.password-field {
    align-items: center;
    position: relative;
    display: flex;
}

.password-field input {
    padding-right: 40px;
    width: 100%;
}

.password-toggle {
    transform: translateY(-50%);
    justify-content: center;
    align-items: center;
    position: absolute;
    background: none;
    cursor: pointer;
    display: flex;
    border: none;
    padding: 5px;
    right: 8px;
    top: 50%;
}

.password-toggle svg {
    color: var(--dark-gray);
    transition: color 0.2s ease;
    height: 20px;
    width: 20px;
}

.password-toggle:hover svg {
    color: var(--secondary);
}

.checkbox-group {
    gap: var(--space-xs);
    align-items: flex-start;
    display: flex;
}

.checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--secondary);
    cursor: pointer;
    margin-top: 3px;
    height: 16px;
    width: 16px;
}

/* ----- Cartes ----- */

.card {
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    background: var(--bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-content {
    padding: var(--space-md);
}

.card-title {
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-price {
    margin-bottom: var(--space-md);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ----- Listes & Items ----- */

.car-list {
    margin: var(--space-lg) 0;
    gap: var(--space-md);
    display: flex;
    flex-direction: column;
}

.car-list li {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg);
    position: relative;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 4px var(--shadow-color-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.car-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.car-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    background: var(--bg);
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 200px;
    max-height: 300px;
    box-shadow: 0 2px 4px var(--shadow-color-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.car-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.car-item-img {
    object-position: center;
    object-fit: cover;
    min-height: 200px;
    max-height: 300px;
    width: 400px;
}

.car-item-content {
    padding: var(--space-md);
    flex-direction: column;
    display: flex;
    flex: 1;
}

.car-item-title {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text);
    font-size: 1.25rem;
}

.car-item-price {
    margin: 0 0 var(--space-xs) 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.car-item-details {
    margin-bottom: var(--space-md);
    gap: var(--space-sm);
    flex-wrap: wrap;
    display: flex;
}

.car-item-description {
    margin-bottom: var(--space-md);
}

.card-detail {
    border-radius: var(--radius-sm);
    background: var(--light-gray);
    color: var(--text);
    align-items: center;
    display: flex;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.car-item-actions {
    gap: var(--space-sm);
    margin-top: auto;
    display: flex;
}

.car-item-status {
    border-radius: var(--radius-sm);
    background: var(--dark-gray);
    color: var(--text-light);
    position: absolute;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    right: 12px;
    top: 12px;
}

.car-item-archived .car-item-status {
    background: var(--dark-gray);
}

.car-item-reserved .car-item-status {
    background: var(--secondary);
}

.car-item-archived {
    position: relative;
    opacity: 0.75;
}

.car-item-archived::before {
    background: var(--shadow-color-light);
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: var(--radius-md);
}

.car-item-reserved {
    position: relative;
}

.car-item-reserved::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    bottom: 0;
    background: var(--secondary);
    z-index: 1;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

/* ----- Galerie d'images & Détails des voitures ----- */

.car-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.car-gallery img {
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}

.car-gallery img:hover {
    transform: scale(1.02);
}

.car-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.car-spec {
    background: var(--light-gray);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.car-spec h3 {
    margin-bottom: var(--space-md);
    color: var(--secondary);
    font-size: 1rem;
}

.car-spec-list {
    list-style: none;
    padding: 0;
}

.car-spec-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--medium-gray);
}

.car-spec-label {
    font-weight: 500;
    color: var(--dark-gray);
}

.car-description {
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.car-image-container {
    position: relative;
    width: fit-content;
}

.car-image-edit {
    cursor: pointer;
    display: block;
    position: relative;
}

.car-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-md);
}

.car-image-edit:hover .car-image-overlay {
    opacity: 1;
}

.car-image-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: var(--dark-gray);
}

.car-image-dropzone:hover {
    border-color: var(--secondary);
    background: var(--bg-secondary);
}

.car-image-dropzone span {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 16px;
}

.car-image-dropzone p {
    font-size: 0.9rem;
    margin-top: 8px;
}

.car-image-dropzone svg {
    color: var(--dark-gray);
}

.car-image-dropzone:hover svg {
    color: var(--secondary);
}

.car-image-upload {
    margin-bottom: var(--space-lg);
}

/* ----- Authentification ----- */

.auth-container {
    max-width: 580px;
    margin: 60px auto;
}

.auth-box {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: var(--bg);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    text-decoration: none;
}

.auth-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.auth-site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.auth-title {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.auth-subtitle {
    color: var(--dark-gray);
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-form {
    margin-top: var(--space-lg);
}

.auth-footer {
    margin-top: var(--space-xl);
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--medium-gray);
}

.auth-footer p {
    margin-bottom: var(--space-sm);
    color: var(--dark-gray);
}

.section-divider {
    display: flex;
    align-items: center;
    margin: var(--space-lg) 0;
    color: var(--dark-gray);
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--medium-gray);
}

.section-divider span {
    padding: 0 var(--space-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--secondary);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ----- Pages de profil ----- */

.profile-container {
    margin-top: var(--space-lg);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.profile-edit-container {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.profile-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.profile-edit-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.profile-picture-form {
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-picture-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: var(--space-md);
}

.profile-picture {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
}

.profile-picture-overlay:hover {
    opacity: 1;
}

.profile-picture-overlay svg {
    margin-bottom: var(--space-sm);
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-top: var(--space-xs);
}

.profile-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.profile-info-card {
    background: var(--light-gray);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.profile-info-card h3 {
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
    color: var(--secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-sm);
}

.profile-details {
    list-style: none;
    padding: 0;
}

.profile-details li {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--medium-gray);
}

.profile-label {
    font-weight: 500;
    color: var(--dark-gray);
}

.profile-value {
    font-weight: 600;
}

.profile-edit-tips {
    background: var(--light-gray);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
}

.profile-edit-tips h3 {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--secondary);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.tips-list {
    padding-left: var(--space-lg);
}

.tips-list li {
    margin-bottom: var(--space-sm);
    list-style-type: disc;
}

/* ----- Onglets ----- */

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.tab-button {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    color: var(--secondary);
}

.tab-button.active {
    color: var(--secondary);
    border-bottom: 3px solid var(--secondary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ----- Groupes de filtres ----- */

.filter-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-left: auto;
    overflow: hidden;
    display: flex;
}

.filter-btn {
    color: var(--text);
    background: var(--bg);
    text-decoration: none;
    border: none;
    padding: 6px 14px;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--light-gray);
}

.filter-btn.active {
    background: var(--secondary);
    color: var(--text-light);
}

/* ----- Alertes ----- */

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alert svg {
    flex-shrink: 0;
    color: inherit;
}

.alert-success {
    background-color: var(--bg-success);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: var(--bg-danger);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background-color: var(--bg-warning);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: var(--bg-info);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ----- État vide ----- */

.empty-state {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--dark-gray);
}

.empty-state svg {
    margin-bottom: var(--space-md);
}

.empty-state p {
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

/* ----- Barre de défilement ----- */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* ----- Utilitaires ------ */

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.ml-xs { margin-left: var(--space-xs); }
.ml-sm { margin-left: var(--space-sm); }
.ml-md { margin-left: var(--space-md); }
.ml-lg { margin-left: var(--space-lg); }

.mr-xs { margin-right: var(--space-xs); }
.mr-sm { margin-right: var(--space-sm); }
.mr-md { margin-right: var(--space-md); }
.mr-lg { margin-right: var(--space-lg); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }

/* ----- Versions responsives ----- */

/* ----- Écran large ----- */
@media (max-width: 1024px) {
    .container {
        margin: 0 auto 20px;
        border-radius: 0;
        max-width: 100%;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----- Tablette ----- */
@media (max-width: 900px) {
    .profile-header,
    .profile-edit-container {
        gap: var(--space-lg);
        align-items: center;
        flex-direction: column;
    }

    .profile-sidebar {
        flex-direction: column;
        align-items: center;
        display: flex;
        width: 100%;
    }

    .profile-info {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .profile-edit-tips {
        width: 100%;
    }

    .auth-container {
        margin: 20px auto;
    }
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    .container {
        padding: var(--space-md);
    }

    .nav,
    .nav-left,
    .nav-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .filter-group {
        margin-top: var(--space-md);
        margin-left: 0;
        width: 100%;
    }

    .filter-btn {
        text-align: center;
        flex: 1;
    }

    .car-list li,
    .car-item {
        flex-direction: column;
    }

    .car-item {
        min-height: auto;
        max-height: none;
    }

    .car-item-img {
        height: 200px;
        width: 100%;
    }

    .car-item-actions {
        flex-direction: column;
    }

    .car-item-actions .btn {
        margin-right: 0 !important;
        width: 100%;
    }

    .car-details {
        grid-template-columns: 1fr;
    }

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

    .form-options {
        gap: var(--space-sm);
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-tabs {
        flex-direction: column;
        border: none;
    }

    .tab-button {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-sm);
        justify-content: center;
    }

    [class*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* ----- Petit écran ----- */
@media (max-width: 576px) {
    .auth-box {
        padding: var(--space-lg);
    }

    .form-row {
        gap: var(--space-sm);
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button,
    .form-actions a {
        width: 100%;
    }

    .car-gallery {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }
}