:root {
    --cream:      #F3EDE3;
    --cream-dark: #EAE2D5;
    --orange:     #B84B0C;
    --orange-lt:  #C95A18;
    --text:       #1A1208;
    --text-muted: #7A6E62;
    --text-light: #A89D92;
    --border:     rgba(26,18,8,0.1);
    --border-md:  rgba(26,18,8,0.16);
    --white:      #FFFFFF;
    --card-bg:    #FAF6F0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
    font-family: 'Jost', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background-image: radial-gradient(circle, rgba(26,18,8,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    padding-bottom: 60px;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; line-height: 1.1; }
a { text-decoration: none; color: inherit; }

/* ── APP NAVBAR (identique aux autres pages connectées) ── */
.app-nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 28px; height: 54px;
}
.app-logo {
    font-family: 'Jost', sans-serif;
    font-weight: 600; font-size: 0.95rem;
    color: var(--text); text-decoration: none;
    display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.logo-star { color: var(--orange); }

.app-nav__tabs {
    display: flex; align-items: center;
    flex: 1; justify-content: center;
}
.nav-tab {
    display: inline-flex; align-items: center;
    height: 54px; padding: 0 18px;
    font-size: 0.84rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }

.app-nav__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--orange); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.03em;
}
.user-plan {
    font-size: 0.63rem; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--text-muted); background: var(--cream-dark);
    border: 1px solid var(--border-md); border-radius: 4px; padding: 3px 7px;
}
.user-arrow { font-size: 0.65rem; color: var(--text-light); }

/* ── MAIN ── */
.main { max-width: 560px; margin: 0 auto; padding: 32px 20px 0; }

.page-header { margin-bottom: 24px; }
.page-title { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.page-subtitle { font-size: 0.86rem; color: var(--orange); font-style: italic; }

/* ── MESSAGE DE STATUT (identique au reste du projet) ── */
.status-msg { display: none; }
.status-msg.visible {
    display: block;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    background: rgba(184,75,12,0.08);
    border: 1px solid rgba(184,75,12,0.25);
    color: var(--orange);
}

.avis-success-panel {
    margin-bottom: 20px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(184,75,12,0.1);
    border: 1px solid rgba(184,75,12,0.3);
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

/* ── CARTES FORMULAIRE (mêmes classes que compte.php) ── */
.form-card {
    background: var(--white);
    border: 1px solid var(--border-md);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.field-hint {
    font-size: 0.72rem;
    color: var(--orange);
    margin-bottom: 10px;
    font-style: italic;
}

.field-textarea {
    width: 100%;
    font-family: 'Jost', sans-serif;
    font-size: 0.86rem;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    padding: 10px 12px;
    resize: vertical;
    min-height: 60px;
}
.field-textarea:focus { outline: 2px solid var(--orange-lt); outline-offset: 1px; }
.field-textarea--large { min-height: 120px; }

.btn-save {
    display: block;
    width: 100%;
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 24px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-bottom: 24px;
}
.btn-save:hover:not(:disabled) { background: var(--orange-lt); transform: translateY(-1px); }
.btn-save:active:not(:disabled) { transform: translateY(0); }
.btn-save:disabled { opacity: 0.6; cursor: default; }

/* ── LÉGENDE ÉTOILES ── */
.star-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-style: italic;
}

/* ── NOTATION PAR ÉTOILES ──
   Radios masqués + labels visuels, ordre DOM inversé (5→1) avec
   flex-direction: row-reverse pour un affichage visuel 1→5 gauche à
   droite. Le survol/sélection d'une étoile colore automatiquement,
   via le sélecteur de frères suivants (~), cette étoile et toutes
   celles à sa gauche visuellement (= valeurs inférieures en DOM,
   grâce à l'inversion) — technique CSS pure standard, sans JS requis
   pour l'état visuel des étoiles. Cible tactile agrandie (44px) pour
   un usage confortable au doigt. */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-bottom: 14px;
}
.star-rating input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.star-rating label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    color: var(--border-md);
    transition: color 0.15s;
    user-select: none;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--orange);
}
.star-rating input:focus-visible + label {
    outline: 2px solid var(--orange-lt);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ── RESPONSIVE — TABLETTE / PETIT DESKTOP (≤ 900px)
   Filet de sécurité pour la 5e étiquette de navigation, propre à cette
   page (les 4 onglets des autres pages du projet n'ont jamais eu besoin
   de ce palier intermédiaire). Sans ce correctif, les 5 onglets
   pourraient se retrouver à l'étroit entre le logo et le bloc
   utilisateur avant même le seuil ≤480px déjà en place ailleurs.
   Réutilise EXACTEMENT le même schéma "deux lignes, hauteur
   automatique" que le palier ≤480px ci-dessous (jamais un simple
   flex-wrap sur les onglets seuls : la barre garde sinon sa hauteur
   fixe de 54px alors que les onglets replient sur plusieurs lignes,
   provoquant un chevauchement visuel — c'est précisément le débordement
   que ce correctif élimine). ── */
@media (max-width: 900px) {
    .app-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 16px;
        row-gap: 8px;
    }
    .app-logo { order: 1; }
    .app-nav__right { order: 2; margin-left: auto; }
    .app-nav__tabs {
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
    }
    .nav-tab {
        height: auto;
        padding: 8px 12px;
        font-size: 0.78rem;
    }
}

/* ── RESPONSIVE — MOBILE (≤ 480px) — mêmes réductions de taille que les
   autres pages du projet à ce seuil, la structure deux-lignes est déjà
   posée par la règle ≤900px ci-dessus. ── */
@media (max-width: 480px) {
    .nav-tab {
        padding: 8px 10px;
        font-size: 0.74rem;
    }
    .main { padding: 24px 16px 0; }
    .star-rating label {
        width: 40px;
        height: 40px;
        font-size: 1.7rem;
    }
}
