/* --- IMPORTATION DE LA POLICE MONTSERRAT VIA GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,700;0,800;0,900;1,400;1,700&display=swap');

:root {
    /* Fonds et éléments (Bleus très sombres de la maquette) */
    --gray-900: #0a0e14;
    /* Fond principal du site */
    --gray-800: #10182c;
    /* Cartes, Header, Footer */
    --gray-700: #1d253b;
    /* Bordures, Inputs, Lignes de séparation */

    /* Textes */
    --gray-400: #8b9bb4;
    /* Texte secondaire (légèrement bleuté) */
    --gray-300: #c1cbe0;
    /* Texte clair */
    --gray-100: #ffffff;
    /* Texte principal (Blanc pur) */

    /* Couleurs de marque et d'accentuation */
    --blue-400: #6a7cff;
    /* Liens, survols (Bleu plus clair pour le contraste) */
    --blue-600: #4454bc;
    /* Boutons primaires (Couleur de la maquette) */

    /* Alertes (inchangées) */
    --green-200: #bbf7d0;
    --green-800: #166534;
    --green-950-alpha: rgba(5, 46, 22, 0.8);

    --red-200: #fecaca;
    --red-800: #991b1b;
    --red-950-alpha: rgba(69, 10, 10, 0.8);

    /* Typographie : Montserrat en priorité, avec des fallbacks propres */
    --font-sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* --- RESET & TYPOGRAPHIE GLOBALE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--gray-900);
    color: var(--gray-100);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Création du fond SVG avec le masque de transparence */
body::before {
    content: "";
    position: fixed;
    bottom: 0;
    right: 0;
    width: 50vw;
    height: 50vh;
    background-image: url(hex-650.svg);
    background-repeat: no-repeat;
    background-position: bottom right;
    z-index: -1;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(circle at bottom right, black 0%, transparent 60%);
    mask-image: radial-gradient(circle at bottom right, black 0%, transparent 60%);
}

a {
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* --- HEADER --- */
.site-header {
    background-color: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-container {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link {
    color: var(--gray-100);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    background-color: rgba(55, 65, 81, 0.3);
}

.nav-link:hover {
    color: var(--blue-400);
}

/* --- MAIN CONTENT --- */
.site-main {
    width: 100%;
    padding: 1.5rem 0.75rem;
    flex-grow: 1;
}

/* --- ALERTES (Flash Messages) --- */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.alert-success {
    background-color: var(--green-950-alpha);
    border-color: var(--green-800);
    color: var(--green-200);
}

.alert-error {
    background-color: var(--red-950-alpha);
    border-color: var(--red-800);
    color: var(--red-200);
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--gray-800);
    border-top: 1px solid var(--gray-700);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* --- RESPONSIVE (Tablettes & Desktop) --- */
@media (min-width: 640px) {
    .header-container {
        flex-direction: row;
        padding: 1rem 1.5rem;
    }

    .brand-logo {
        font-size: 1.5rem;
    }

    .site-nav {
        gap: 1rem;
        font-size: 1rem;
    }

    .nav-link {
        background-color: transparent;
    }

    .site-main {
        padding: 2.5rem 1.5rem;
    }

    .alert {
        font-size: 1rem;
    }

    .site-footer {
        font-size: 0.875rem;
    }
}

/* --- LAYOUT UTILITIES --- */
.hero-container {
    max-width: 42rem;
    /* Équivalent à max-w-2xl */
    margin: 1rem auto 0;
    text-align: center;
}

/* --- TYPOGRAPHIE HERO --- */
.hero-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.text-link {
    color: var(--blue-400);
    font-weight: 600;
}

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

/* --- CARDS (Blocs de contenu) --- */
.card {
    background-color: var(--gray-800);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-700);
    margin: 0 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

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

.form-input {
    padding: 0.75rem;
    background-color: var(--gray-700);
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 2px var(--blue-600);
}

.form-note {
    font-size: 0.6875rem;
    color: var(--gray-400);
    margin-top: 1rem;
    text-align: left;
    line-height: 1.625;
}

/* --- BOUTONS --- */
.btn {
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: inline-block;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--blue-600);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

/* --- RESPONSIVE (Tablettes & Desktop) --- */
@media (min-width: 640px) {
    .hero-container {
        margin-top: 2.5rem;
    }

    .hero-title {
        font-size: 2.25rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .card {
        padding: 2rem;
        margin: 0;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .form-note {
        font-size: 0.75rem;
    }
}

/* --- LAYOUT & UTILITIES --- */
.container-md {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-700);
    color: #ffffff;
}

.hidden {
    display: none !important;
}

.divider {
    border-top: 1px solid var(--gray-700);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

/* --- FORMS COMPONENTS --- */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--gray-300);
}

.form-label-sub {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.error-box {
    color: var(--red-200);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    background-color: var(--red-950-alpha);
    padding: 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid var(--red-800);
}

/* --- INPUT FILE CUSTOM --- */
.file-input {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 0.5rem;
    color: var(--gray-300);
    font-size: 0.875rem;
    cursor: pointer;
}

.file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--blue-600);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-input::file-selector-button:hover {
    background-color: #1d4ed8;
}

/* --- PREVIEW BOX (RSS) --- */
.preview-box {
    background-color: var(--gray-900);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-700);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.preview-box.flex {
    display: flex !important;
}

.preview-img {
    width: 7rem;
    height: 7rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

.preview-content {
    flex-grow: 1;
    overflow: hidden;
    width: 100%;
}

.preview-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--blue-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.preview-artist {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-desc {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
    text-align: justify;
    line-height: 1.6;
}

.preview-link {
    font-size: 0.75rem;
    color: var(--blue-400);
    word-break: break-all;
    background-color: rgba(31, 41, 55, 0.5);
    padding: 0.5rem;
    border-radius: 0.25rem;
    display: block;
}

/* --- CAPTCHA --- */
.captcha-box {
    background-color: var(--gray-900);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-700);
}

.captcha-desc {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 24rem;
    margin: 0 auto;
}

.captcha-btn {
    font-size: 2rem;
    padding: 0.75rem 0.5rem;
    background-color: var(--gray-800);
    border-radius: 0.75rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.captcha-btn:hover {
    background-color: rgba(55, 65, 81, 0.8);
}

.captcha-btn.selected {
    border-color: var(--blue-600);
    background-color: var(--gray-700);
}

/* --- BOUTONS ADDITIFS --- */
.btn-success {
    background-color: #16a34a;
    color: #ffffff;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-success:hover {
    background-color: #15803d;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (min-width: 640px) {
    .page-title {
        font-size: 1.875rem;
    }

    .input-group {
        flex-direction: row;
    }

    .btn-verify {
        white-space: nowrap;
    }

    .preview-box {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .preview-img {
        width: 6rem;
        height: 6rem;
    }

    .preview-desc {
        text-align: left;
        font-size: 0.875rem;
    }

    .preview-link {
        background-color: transparent;
        padding: 0;
    }

    .captcha-grid {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }

    .captcha-btn {
        font-size: 2.5rem;
        width: 100%;
    }
}

/* --- LAYOUT UTILITIES (Suite) --- */
.container-sm {
    max-width: 28rem;
    /* Équivalent à max-w-md */
    margin: 2.5rem auto 0;
    padding: 0 0.5rem;
}

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

.w-full {
    width: 100%;
}

/* --- SUCCESS PAGE SPECIFICS --- */
.mt-10 {
    margin-top: 1.5rem;
}

.success-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.success-desc {
    font-size: 0.875rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.preview-img-placeholder {
    width: 7rem;
    height: 7rem;
    border-radius: 0.5rem;
    background-color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.inline-link {
    display: inline-block;
    font-size: 0.75rem;
}

.return-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    background-color: rgba(55, 65, 81, 0.4);
    border-radius: 0.5rem;
    font-weight: 500;
}

/* --- RESPONSIVE DESKTOP --- */
@media (min-width: 640px) {
    .mt-10 {
        margin-top: 2.5rem;
    }

    .success-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .success-title {
        font-size: 1.875rem;
        margin-bottom: 1.5rem;
    }

    .success-desc {
        font-size: 1rem;
    }

    .preview-img-placeholder {
        width: 6rem;
        height: 6rem;
        font-size: 2rem;
    }

    .return-link {
        background-color: transparent;
        padding: 0;
        font-size: 1rem;
    }

    .inline-link {
        font-size: 0.875rem;
        background-color: transparent;
        padding: 0;
    }
}

/* --- TEXT UTILITIES --- */
.text-muted {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.mb-4 {
    margin-bottom: 1rem;
}