:root {
    --color-bg: #022c22;
    --color-surface: #0f766e;              /* vert d’eau foncé pour les cartes */
    --color-primary: #06b6d4;              /* turquoise */
    --color-secondary: #22c55e;            /* vert vif */
    --color-text-main: #ecfeff;
    --color-text-muted: #bae6fd;
    --color-border: #134e4a;

    --color-link: #0a1b46;      /* bleu plus sombre (type Tailwind blue-700) */
    --color-link-hover: #93c5fd;

    /* Fond global: plus profond, plus sombre */
    --color-bg-gradient: linear-gradient(
        135deg,
        #0f172a 0%,   /* bleu nuit */
        #0ea5e9 35%,  /* bleu clair */
        #22c55e 100%  /* vert lagune */
    );

    /* Header: même esprit mais plus clair et plus doux */
    --color-header-gradient: linear-gradient(
        135deg,
        #1e293b 0%,   /* bleu-gris un peu plus clair que #0f172a */
        #38bdf8 40%,  /* turquoise plus vif */
        #4ade80 100%  /* vert clair */
    );

    /* Navbar: légèrement plus sombre que le header, mais pas blanc */
    --color-nav-gradient: linear-gradient(
        135deg,
        #1c5380 0%,    /* bleu nuit */
        #0f766e 40%,   /* vert d’eau */
        #16a34a 100%   /* vert */
    );
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding-bottom: 400px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg-gradient);
    color: var(--color-text-main);
    position: relative;
    overflow-x: hidden;
}

/* voile subtil pour adoucir le dégradé global */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(15,23,42,0.25), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

input, select, textarea {
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
    border-color: var(--color-border);
}

.app-header {
    background: var(--color-header-gradient);
    border-bottom: 1px solid var(--color-border);
}

/* Liens par défaut */
a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Conteneur global simple */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.75rem 1rem 0;
}

.card {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
}

/* Sous-titre / texte discret */
.text-muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.app-header-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
}

.app-header-title {
    display: flex;
    flex-direction: column;
}

.app-header-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    text-align: center;
}

.app-logo-icon {
    width: 54px;
    height: 54px;
}

.app-logo-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.app-header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
    min-width: 0; /* évite que ça pousse tout */
}

.app-header-user-name {
    font-weight: 600;
}

.app-header-user-level {
    opacity: 0.85;
    font-size: 0.85rem;
}

.app-logo {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.app-subtitle {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.app-nav-bottom {
    position: fixed;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 100% - 1.5rem);
    z-index: 1000;

    display: flex;
    justify-content: space-around;
    padding: 0.4rem 0.6rem;

    background: var(--color-nav-gradient);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.3);
}

.app-nav-bottom .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;          /* centre icône + texte */
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.7rem;
    padding: 0.25rem 0.3rem;          /* espace pour la pastille */
    border-radius: 999px;             /* important pour le rond */
    transition: background 0.2s ease, color 0.2s ease;
}

.app-nav-bottom .nav-item-active {
    background: rgba(188, 201, 211, 0.18);
    color: #ffffff;
}

.app-nav-bottom .nav-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 0.05rem;
}

.app-nav-bottom .nav-label {
    margin-top: 0.05rem;
}

.home-screen {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.card {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.2rem;
}

.home-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.home-header-main h1 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.home-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.home-header-badge {
    display: flex;
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #dcfce7;
    color: #166534;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

/* Cartes génériques */
.card {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
}

.text-muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Boutons (reprise simplifiée) */
button,
.btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

button.secondary {
    background: #e5f0ff;
    color: var(--color-primary);
}

.btn-danger {
    background: #ef4444;
}

/* Session : localisation */
.session-location h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.session-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0 0.8rem;
    background-color: transparent;  /* plus de pastille */
    padding: 0;                     /* plus de halo autour */
    border-radius: 0;
}

.tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
    background: transparent; /* au cas où */
}

.tab-button {
    flex: 1;
    padding: 0.4rem 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.35);
    font-size: 0.85rem;
    cursor: pointer;

    background: rgba(15, 23, 42, 0.45);
    color: #e5e7eb;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    border-color: rgba(34, 197, 94, 0.7);
}

/* Affichage du chrono + compte à rebours */
.timer-display {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.3rem 0 0.5rem;

    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.95),
        rgba(15, 118, 110, 0.9)
    );
    color: #ecfeff;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(19, 78, 74, 0.8);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.timer-controls button {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;

    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    border: 1px solid rgba(15, 23, 42, 0.6);
    transition: background 0.15s ease, transform 0.1s ease;
}

.timer-controls button:hover {
    background: rgba(15, 23, 42, 0.95);
}

.timer-controls button:active {
    transform: scale(0.97);
}

/* fond légèrement plus clair pour les champs time */
input[type="time"] {
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
    border-color: var(--color-border);
}

input[type="time"]::-webkit-calendar-indicator {
    filter: invert(1) brightness(1.3);
}
.countdown-config input[type="number"] {
    width: 80px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.45rem;
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
}

.countdown-config {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.countdown-config input[type="number"] {
    width: 70px;
}

/* Session : lancers */
.session-casts h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.session-casts {
    text-align: center;              /* centre le titre */
}

.session-casts-controls {
    display: inline-flex;            /* important : le bloc prend juste sa largeur */
    align-items: center;
    gap: 0.4rem;
    justify-content: center;         /* centre les éléments dans le bloc */
}

.session-casts-controls button {
    width: 32px;
    height: 32px;
    justify-content: center;
    padding: 0;
}

#fish-search-input {
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;          /* texte lisible */
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
}

/* couleur du placeholder */
#fish-search-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.85;
}

.fish-search-results {
    background-color: white;              /* plus de blanc */
    color: black;
}

.fish-search-item:hover {
    background-color: rgba(37, 99, 235, 0.35);
}

.fish-show-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.fish-show-name {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.fish-show-subtitle {
    margin: 0;
    font-size: 0.85rem;
}

.fish-show-image-wrapper {
    width: 156px;
    height: 156px;
    border-radius: 16px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fish-show-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fish-show-description h2 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.fish-show-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .fish-show-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fish-show-block h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.fish-show-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.fish-show-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.25);
}

.fish-show-list li:last-child {
    border-bottom: none;
}

.fish-show-list .label {
    color: var(--color-text-muted);
}

.fish-show-list .value {
    font-weight: 500;
    text-align: right;
}

#casts-count {
    min-width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e5f0ff;
    color: var(--color-primary);
    font-weight: 600;
}

.session-casts-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Session : actions */
.session-actions h3 {
    margin-top: 0;
}

.session-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0.75rem 0;
}

.session-actions-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Le form et le lien prennent toute la largeur du conteneur */
.session-actions-row form,
.session-actions-row a {
    width: 100%;
}

/* Les vrais boutons prennent aussi toute la largeur */
.session-actions-row button,
.session-actions-row .btn {
    display: inline-flex;   /* ou flex */
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

#finish-session-form {
    display: flex;
    justify-content: flex-start;
}

.tab-content {
    display: none !important;
}

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

/* Formulaire vertical */
.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.form-field label {
    font-weight: 500;
    color: var(--color-text-main);
}

.form-field input,
.form-field select,
.form-field textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 0.45rem 0.5rem;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
}

/* Deux colonnes pour poids / longueur sur écrans un peu plus grands */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

@media (min-width: 480px) {
    .form-row {
        flex-direction: row;
    }

    .form-row .form-field {
        flex: 1;
    }
}

/* Erreurs */
.form-error {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

@media (min-width: 480px) {
    .form-actions {
        flex-direction: row;
    }
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.85);          /* fond sombre */
    color: var(--color-text-main);
    border: 1px solid rgba(148, 163, 184, 0.7);  /* légère bordure */
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.95);
}

.history-filters {
    margin-bottom: 0.9rem;
}

.history-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 0.6rem;
}

.history-fieldset legend {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.history-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.history-field input,
.history-field select {
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
    font-family: inherit;

    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
}

.history-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

@media (min-width: 480px) {
    .history-actions {
        flex-direction: row;
    }
}

.history-table-wrapper {
    padding: 0;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-table thead,
.session-catches thead {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.95),
        rgba(15, 118, 110, 0.9)
    );
    color: #ecfeff;
}

.history-table th,
.history-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.history-table th {
    font-weight: 600;
    color: var(--color-text-main);
    white-space: nowrap;
}

.history-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.session-actions-cell {
    text-align: center;
    white-space: nowrap;
}

.menu-wrapper {
    position: relative;
    display: inline-block;
}

.menu-trigger {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
}

.menu {
    position: absolute;
    right: 0;
    top: 120%;
    min-width: 130px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16);
    padding: 0.25rem 0;
    display: none;
    z-index: 10;
}

.menu-wrapper.open .menu {
    display: block;
}

.menu a {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-main);
    text-decoration: none;
}

.menu a:hover {
    background-color: #eff6ff;
}

.menu-wrapper.open .menu {
    display: block;
}

.history-actions-cell {
    white-space: nowrap;
    font-size: 0.8rem;
}

.link-action {
    color: var(--color-primary);
    text-decoration: none;
}

.link-action:hover {
    text-decoration: underline;
}

.link-danger {
    color: #b91c1c;
}

.action-separator {
    margin: 0 0.25rem;
    color: var(--color-text-muted);
}

.session-tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.3rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-main);
    cursor: pointer;
}

.session-tab.active {
    background-color: #2563eb;
    color: #ffffff;
}

/* Contenu des onglets */
.session-panels {
    position: relative;
}

/* caché par défaut */
.session-panel {
    display: none;
}

/* actif uniquement */
.session-panel.active {
    display: block;
}

/* Résumé, notes, prises : cartes */
.session-panel-data section {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
}

/* Titre de section */
.session-panel-data section h2 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    font-size: 1rem;
}

.session-panel-data section.session-catches {
    background-color: transparent;
    border-radius: 0;
    border: none;
    padding: 0;            /* ou un léger padding si tu veux (ex: 0.25rem 0) */
    margin-bottom: 0.9rem; /* tu peux garder l'espace sous la section */
}

.session-panel-data section.session-catches h2 {
    margin-bottom: 0.5rem;
}

/* Notes */
.session-notes textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 0.45rem 0.5rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.session-notes button {
    margin-top: 0.4rem;
}

.session-notes h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.session-notes-title,
.session-notes-form {
    margin-top: 0.4rem;
    gap: 0.5rem;
}

.session-notes-current {
    margin: 0.5rem 0 0.6rem;
    font-size: 0.9rem;
}

.session-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0.6rem 0;
}

.session-catches {
    margin-top: 2rem;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Grille de cartes */
.catches-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Card */
.catch-card {
    background: var(--color-surface, #1f2933);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    margin-bottom: 0.75rem;
}

/* Grille interne 3 colonnes */
.catch-card-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr; /* espèce+photo un peu plus large */
    gap: 1rem;
    align-items: flex-start;
}

/* Colonnes */
.catch-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catch-col-main {
    align-items: center;
    text-align: center;
}

/* Espèce + photo */
.catch-species-block {
    margin-bottom: 0.5rem;
}

.catch-species {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.catch-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    /* tu peux aussi fixer une hauteur mini pour stabiliser la card */
    min-height: 80px;
}

.catch-photo img {
    max-width: 100px;
    max-height: 120px;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    object-fit: contain; /* pour être sûr de ne rien rogner */
}

.catch-photo-placeholder {
    width: 100%;
    max-width: 140px;
    height: 90px;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Champs (label + valeur) */
.catch-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.9rem;
}

.catch-label {
    font-weight: 600;
    opacity: 0.85;
}

.catch-value {
    opacity: 0.95;
}

.session-location h2 {
    margin-top: 0;
}

.session-map {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-top: 0.4rem;
}

.session-map {
    width: 100%;
    max-width: 600px;
    height: 250px;
}

.session-panel-charts {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem;
}

.session-panel-charts h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Select du type de graphique */
.chart-select-wrapper {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.chart-select-wrapper select {
    margin-top: 0.2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.45rem;
    font-size: 0.9rem;
}

/* Blocs de graphique */
.chart-block {
    margin-top: 0.8rem;
}

.chart-block h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}

/* Filtres species / appât */
.chart-filters {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.species-filters,
.bait-filters-species-bait {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
    margin-top: 0.2rem;
}

.chart-wrapper {
    position: relative;
    height: 260px;
    max-width: 100%;
}

.fishpedia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cartes par ligne */
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.fish-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    font-size: 0.8rem;
    text-align: center;
}

.fish-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* Partie texte */
.fish-card > a > div:last-child {
    padding: 0.35rem 0.4rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fish-card span {
    display: block;
}

/* Numéro + nom */
.fish-card span:nth-child(1) {
    font-weight: 500;
    color: var(--color-text-muted);
}

.fish-card span:nth-child(2) {
    font-weight: 600;
}

/* Texte “déjà attrapé / pas encore attrapé” */
.fish-card span:nth-child(3) {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* État attrapé */
.fish-card--caught {
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
}

/* État non attrapé : grisé */
.fish-card--uncaught {
    filter: grayscale(0.9);
    opacity: 0.7;
}

.fishpedia-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
}

/* liens de pagination : bleu sombre des liens */
.fishpedia-pagination a {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--color-link);          /* bleu sombre */
}

.fishpedia-pagination a:hover {
    background-color: rgba(37, 99, 235, 0.18);
    text-decoration: underline;
}

/* page actuelle */
.fishpedia-pagination strong {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.fishpedia-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;              /* carré, même proportion pour tout le monde */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;              /* fond neutre si bords vides */
}

.fishpedia-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;  /* on voit l’image en entier, quitte à avoir des bords */
    display: block;
}

/* Liste d'amis */
.friends-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid rgba(209, 213, 219, 0.7);
}

.friend-item:last-child {
    border-bottom: none;
}

.friend-item-empty {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Avatar + infos */
.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.5);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-info strong {
    font-size: 0.9rem;
}

.friend-title {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.9;
}

.friend-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Actions sur un ami */
.friend-actions {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.friend-actions form {
    margin: 0;
}

.friend-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Conteneur de la barre de recherche */
.friend-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.7rem;
    background-color: white;        /* ou var(--color-surface) si tu préfères */
    color: black;
}

/* Icône loupe */
.friend-search-input-wrapper .nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
}

/* Input intégré (sans bord blanc, sans fond séparé) */
#friend-search-input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    font-family: inherit;
    background: transparent;
    color: black;
}

#friend-search-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.9;
}

/* Résultats de recherche (le HTML vient de la route friends_search) */
.friend-search-results {
    font-size: 0.85rem;
}

/* Demandes reçues / envoyées */
.friend-requests-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid rgba(209, 213, 219, 0.7);
}

.friend-request-item:last-child {
    border-bottom: none;
}

.friend-request-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.friend-request-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.friend-request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.friend-request-actions form {
    margin: 0;
}

/* Icônes inline (dans les titres, champs, etc.) */
.icon-inline {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.profile-card h1 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.5);
}

.profile-main-info {
    flex: 1;
    min-width: 0;
}

.profile-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.profile-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Spot favori / carte */
.session-map {
    width: 100%;
    max-width: 600px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-top: 0.4rem;
}

/* Liens profil ami */
.profile-links {
    list-style: none;
    padding: 0;
    margin: 0 0 0.6rem;
}

.profile-links li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.profile-back {
    margin: 0;
}

.history-actions-cell {
    white-space: nowrap;
    font-size: 0.8rem;
}

.link-action {
    color: var(--color-primary);
    text-decoration: none;
}

.link-action:hover {
    text-decoration: underline;
}

/* Grille de récompenses */
.rewards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 0.6rem;
}

@media (min-width: 640px) {
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cartes de récompenses */
.reward-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reward-title {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.reward-description {
    margin: 0;
    font-size: 0.85rem;
}

.reward-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.reward-footer {
    margin-top: 0.4rem;
}

/* Variantes selon le statut */
.reward-not_completed {
    border-left: 4px solid #9ca3af;
}

.reward-ready_to_claim {
    border-left: 4px solid #2563eb;
}

.reward-claimed {
    border-left: 4px solid #16a34a;
}

/* Badges */
.badge-gray {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #e5e7eb;
    color: #4b5563;
}

/* Profil */
.profile-card h1 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.5);
}

.profile-avatar.placeholder {
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
    font-size: 2rem;
}

.profile-main-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    font-size: 1rem;
}

.profile-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.profile-bio {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.profile-extra {
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.profile-active-title {
    font-weight: 600;
}

/* Erreurs formulaire */
.form-error {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* Stats */
.stats-list {
    padding-left: 1.1rem;
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
}

/* Récompenses possédées */
.owned-rewards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin: 0.4rem 0 0.6rem;
}

@media (min-width: 640px) {
    .owned-rewards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.owned-reward-card {
    border-radius: 10px;
    border: 1px solid var(--color-border);
    padding: 0.6rem 0.7rem;
    font-size: 0.85rem;
}

.owned-reward-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.owned-reward-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.owned-reward-description {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

/* Paramètres */
.settings-list {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

.settings-list li {
    margin-bottom: 0.3rem;
}

.settings-list a img {
    margin-right: 0.25rem;
}

/* Petite icône inline déjà définie */
.icon-inline {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.card h1 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.card h2 {
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.card p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.card ul {
    margin: 0 0 0.4rem 1.2rem;
    font-size: 0.9rem;
}

.error-card {
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.error-code {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.error-card h1 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
}

.error-message {
    margin: 0 0 0.7rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
    text-align: center;
}

.auth-card .form-vertical {
    margin-top: 0.3rem;
}

.auth-remember label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.auth-links {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    text-align: center;
}

.info-message {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Conteneur pour harmoniser avec les autres champs */
.form-field input[type="file"] {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.form-field input[type="file"]::file-selector-button {
    margin-right: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.form-field input[type="file"]::file-selector-button:hover {
    background-color: #1d4ed8;
}

.form-field input[type="file"]::file-selector-button:active {
    transform: scale(0.97);
}

.flash-banner {
    position: fixed;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 100% - 1.5rem);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: linear-gradient(135deg, #dcfce7, #dbeafe);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    color: #111827;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1500;
}

.flash-banner.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* variantes couleur si tu veux différencier info / succès / erreur */
.flash-banner.success {
    background: linear-gradient(135deg, #bbf7d0, #dcfce7);
}

.flash-banner.info {
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.flash-banner.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.confirm-modal[aria-hidden="false"] {
    display: flex;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.confirm-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(320px, 100% - 2rem);
    border-radius: 16px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.8);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    padding: 0.9rem 1rem;
    color: #e5e7eb;
}

.confirm-modal-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

.confirm-modal-message {
    margin: 0 0 0.7rem;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

/* Bouton rouge danger */
.btn.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

.btn.btn-danger:hover {
    background-color: #b91c1c;
}

.app-header-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-back-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--color-text-main); /* adapte à ta couleur */
    padding: 0;
    line-height: 1;
}

.header-back-button:hover {
    opacity: 0.8;
}

.level-progress {
    margin-top: 0.75rem;
}

.level-progress-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.level-progress-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 999px;
    transition: width 0.3s ease-out;
}

.app-logo-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;      /* rend l’image ronde */
    object-fit: cover;       /* rogne proprement si l’image n’est pas parfaitement carrée */
    box-shadow: 0 0 4px rgba(0,0,0,0.3); /* léger effet “icône d’app” */
}

.history-filters {
    margin-bottom: 1rem;
}

.history-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.1);
}

.history-panel {
    margin-top: 0.5rem;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease;
    opacity: 1;
}

.history-panel--collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Cartes d'historique */

.history-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-card {
    padding: 0.75rem 1rem;
}

.history-card-header {
    margin-bottom: 0.5rem;
}

.history-card-title {
    margin: 0;
    font-size: 1.1rem;
}

.history-card-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.history-card-body p {
    margin: 0.15rem 0;
    font-size: 0.9rem;
}

.history-card-footer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.fish-search-item {
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.loader {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #1b2740 0%, #050814 60%, #020308 100%);
    z-index: 9999;
}

body.is-loading .loader {
    display: flex;
}

/* Bassin d'eau plus clair */
.water {
    margin: auto;
    position: relative;
    width: 260px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        #4cb3ff 0%,    /* bleu clair */
        #2385d6 45%,   /* bleu moyen */
        #0b3a66 85%    /* bleu plus sombre */
    );
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* Poisson qui saute en arc à travers l'eau */
.loader-fish-img {
    position: absolute;
    width: 30px;
    height: auto;
    animation: fish-jump-arc 1s ease-in-out infinite;
}

@keyframes fish-jump-arc {
    0% {   /* dans l’eau, côté droit */
        transform: translate(190px, 50px) rotate(50deg);
    }
    10% {
        transform: translate(175px, 35px) rotate(45deg);
    }
    20% {  /* commence à monter, va vers la gauche */
        transform: translate(160px, 20px) rotate(35deg);
    }
    30% {
        transform: translate(145px, 12px) rotate(20deg);
    }
    40% {  /* sommet de l’arc, plus à gauche et plus haut */
        transform: translate(130px, 5px) rotate(0deg);
    }
    50% {
        transform: translate(115px, 12px) rotate(-15deg);
    }
    60% {  /* redescend vers la surface */
        transform: translate(100px, 20px) rotate(-30deg);
    }
    70% {
        transform: translate(85px, 35px) rotate(-40deg);
    }
    80% {  /* revient dans l’eau un peu plus à droite */
        transform: translate(70px, 50px) rotate(-45deg);
    }
    90% {
        transform: translate(55px, 50px) rotate(-50deg);
    }
    100% { /* retour au point de départ à droite */
        transform: translate(40px, 50px) rotate(50deg);
    }
}

/* Ondes dans l'eau */
.ripple {
    position: absolute;
    left: 50%;
    top: 65%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(203, 238, 255, 0.9);
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: ripple 1.8s ease-out infinite;
}

.ripple-2 {
    animation-delay: 0.2s;
}

.ripple-3 {
    animation-delay: 0.4s;
}

@keyframes ripple {
    0% {
        width: 6px;
        height: 6px;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    60% {
        width: 80px;
        height: 24px;
        opacity: 0.4;
    }
    100% {
        width: 120px;
        height: 36px;
        opacity: 0;
    }
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    color: #fff;
    padding: 12px 16px;
    z-index: 9999;
    font-size: 14px;
}

.cookie-banner__content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-banner__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}