/* SubTrack Custom Styles & Typography */

/* Safe area for iPhone notch, Dynamic Island, and home indicator in Standalone mode */
body {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.011em;
}

/* Transitions douces lors du basculement clair / sombre */
body, .sub-card, header, select, input, button {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Highlight tap color for mobile devices */
.tap-highlight-transparent {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent accidental text selection on mobile buttons */
button, select {
    user-select: none;
    -webkit-user-select: none;
}

/* Custom scrollbars (Sombre & Clair) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

html.light ::-webkit-scrollbar-track,
html:not(.dark) ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
html.light ::-webkit-scrollbar-thumb,
html:not(.dark) ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
html.light ::-webkit-scrollbar-thumb:hover,
html:not(.dark) ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth modal transitions */
.modal-backdrop {
    transition: opacity 0.2s ease-in-out;
}

/* Card hover animation & ombres en mode clair */
.sub-card {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

html.dark .sub-card:hover {
    border-color: #475569;
}

html.light .sub-card,
html:not(.dark) .sub-card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

html.light .sub-card:hover,
html:not(.dark) .sub-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px -3px rgba(0, 0, 0, 0.08);
}

/* Star rating interactive hover */
.star-btn {
    transition: transform 0.1s ease, color 0.1s ease;
}

.star-btn:hover {
    transform: scale(1.15);
}
