/* --------- BASE ---------- */

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-alt);
    padding: 40px 0;
    margin: 0;
    color: var(--text);
}

:root {
    --primary: #ff385c;
    --primary-hover: #e03150;
    --text: #222;
    --text-light: #555;
    --bg: #ffffff;
    --bg-alt: #f7f7f7;
    --border: #e5e5e5;
    --radius: 10px;
    --shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* --------- LAYOUT ---------- */

.container {
    width: 92%;
    max-width: 900px;
    margin: auto;
}

.card {
    background: var(--bg);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* --------- TITLES ---------- */

h1, h2, h3 {
    font-weight: 600;
    margin-top: 0;
}

h1 {
    font-size: 28px;
}
h2 {
    font-size: 22px;
}

/* --------- INPUTS ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 8px 0 16px;
    font-size: 15px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* --------- BUTTONS ---------- */

button, .btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s;
}

button:hover,
.btn:hover {
    background: var(--primary-hover);
}

/* Secondary button */
.btn-secondary {
    background: #ccc;
    color: #333;
}
.btn-secondary:hover {
    background: #b8b8b8;
}

/* --------- TABLES ---------- */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    padding: 14px 6px;
    text-align: left;
}

.table th {
    background: #fafafa;
    font-weight: 600;
}

/* --------- LINKS ---------- */

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --------- NAVBAR ---------- */

.navbar {
    background: var(--bg);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 600;
}

/* --------- PREVIEW IMAGE ---------- */

.img-preview {
    max-width: 240px;
    border-radius: var(--radius);
    margin-top: 8px;
    display: block;
}

/* --------- Jauge dashboard Crédit restant ---------- */
.card .btn {
    display: inline-block;
    text-align:center;
    padding:10px 18px;
    border-radius:8px;
}

/* Conteneur dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

/* --------- NAVBAR ---------- */

.navbar {
    background: var(--bg);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.nav-links {
    display: flex;
    align-items: center; /* aligne tout verticalement */
    gap: 22px;
}

/* style unifié des liens */
.nav-links a,
.nav-links .dropbtn {
    font-weight: 600;
    font-size: 16px;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary); /* même couleur que les liens */
}

.nav-links a:hover,
.nav-links .dropbtn:hover {
    opacity: .7;
    text-decoration: none;
}

/* --------- DROPDOWN AIDE ---------- */

.dropdown {
    position: relative;
}

/* reset complet du bouton */
.dropbtn {
    display: inline-block;
    font: inherit;
    line-height: inherit;
}

/* menu déroulant */
.dropdown-content {
    display: none;
    position: absolute;
    top: 32px;       /* descend exactement sous le menu */
    left: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 220px;
    padding: 8px 0;
    z-index: 1000;
}

/* liens internes */
.dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-weight: 500;
}

.dropdown-content a:hover {
    background: #f3f3f3;
}

/* afficher le menu */
.dropdown:hover .dropdown-content {
    display: block;
}

