/* style.css - Version Notion / Coffee Shop + Mobile Cards Fan */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Patrick+Hand&display=swap');

:root {
    --bg-color: #F7F5F0;
    --card-bg: #FFFFFF;
    --stroke: #18181b;
    --shadow-offset: 5px;
    
    --accent-jellyfin: #E0CFFC; 
    --accent-jellyseerr: #BAE6FD;
    --accent-authentik: #FFDDBA;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--stroke);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-image: radial-gradient(#D4D4D8 1px, transparent 1px);
    background-size: 20px 20px;
    overflow-x: hidden; /* Important pour éviter le scroll horizontal sur mobile avec les rotations */
}

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
}

.header h1 {
    font-family: 'Patrick Hand', cursive;
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--stroke);
    transform: rotate(-2deg);
}

.header p {
    font-family: 'Inter', sans-serif;
    color: #52525b;
    font-size: 1.1rem;
    line-height: 1.5;
    background: #fff;
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid var(--stroke);
    border-radius: 50px;
}

/* Grille des cartes */
.cards-container {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--stroke);
    border-radius: 12px;
    padding: 40px 25px;
    width: 320px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    
    /* L'ombre dure + Transition pour l'animation */
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--stroke);
    transition: all 0.2s ease;
}

/* Animation au survol des cartes */
.card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px var(--stroke);
}

/* Les cercles colorés */
.icon-bg {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    border: 2px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-jellyfin .icon-bg { background-color: var(--accent-jellyfin); }
.card-jellyseerr .icon-bg { background-color: var(--accent-jellyseerr); }

.icon-bg svg {
    width: 45px;
    height: 45px;
    fill: var(--stroke);
}

.service-title {
    font-family: 'Patrick Hand', cursive;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.hand-arrow {
    height: 50px;
    margin: 10px auto;
    opacity: 0.8;
    transform: rotate(5deg);
}
.hand-arrow path {
    fill: none;
    stroke: var(--stroke);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
}

.description h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.description p {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.2rem;
    color: #52525b;
}

/* --- Section Authentik --- */
.auth-section {
    background: var(--card-bg);
    border: 2px solid var(--stroke);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    /* Ajout de l'ombre et de la transition comme les cartes */
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--stroke);
    transition: all 0.2s ease;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-decoration: none; /* Important si on rend toute la boite cliquable */
    color: inherit;
}

/* AJOUT : Animation au survol pour Authentik */
.auth-section:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px var(--stroke);
}

.auth-section::before {
    content: "ADMIN";
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--stroke);
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 8px;
    font-weight: bold;
    transform: rotate(3deg);
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-header svg {
    fill: var(--accent-authentik);
    stroke: var(--stroke);
    stroke-width: 2px;
}

.auth-header h2 a {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.8rem;
    text-decoration: none;
    color: var(--stroke);
}

.auth-text {
    font-size: 0.95rem;
    color: #52525b;
    border-top: 1px dashed var(--stroke);
    padding-top: 10px;
    margin-top: 5px;
    width: 100%;
}

/* =========================================
   VERSION MOBILE : Effet "Cartes en main"
========================================= */
@media (max-width: 768px) {
    .header {
        margin-bottom: 30px;
    }
    .header h1 { font-size: 2.5rem; }
    
    /* Le conteneur force les cartes sur une ligne */
    .cards-container {
        flex-wrap: nowrap; /* Pas de retour à la ligne */
        gap: 0; /* On enlève l'espace standard, on gère avec les marges */
        align-items: center; /* Centrer verticalement */
        padding: 10px 0; /* Un peu d'espace pour les ombres */
        width: 100%;
        max-width: 400px; /* Limite la largeur totale sur mobile */
    }

    /* Style de base des cartes sur mobile */
    .card {
        width: auto;
        flex: 1 1 50%; /* Les cartes essaient de prendre 50% chacune */
        min-width: 150px; /* Taille minimum pour rester lisible */
        padding: 25px 15px; /* Moins de padding interne */
        /* Important : permet le chevauchement sans casser le layout */
        flex-shrink: 0; 
    }

    /* Carte de Gauche (Jellyfin) */
    .card-jellyfin {
        transform: rotate(-4deg) translateY(5px); /* Penchée à gauche, un peu plus bas */
        margin-right: -30px; /* MARGE NÉGATIVE : C'est ça qui crée le chevauchement */
        z-index: 1; /* En dessous */
    }

    /* Carte de Droite (Jellyseerr) */
    .card-jellyseerr {
        transform: rotate(3deg) translateY(-5px); /* Penchée à droite, un peu plus haut */
        z-index: 2; /* Au-dessus */
        margin-left: -10px; /* Petite marge négative pour resserrer */
    }

    /* Ajustement du survol sur mobile pour tenir compte des rotations */
    .card-jellyfin:hover {
        transform: rotate(-4deg) translateY(5px) translate(-3px, -3px);
        z-index: 10; /* Passe au premier plan au survol */
    }
    .card-jellyseerr:hover {
        transform: rotate(3deg) translateY(-5px) translate(-3px, -3px);
        z-index: 10;
    }

    /* Réduction des éléments internes pour que ça rentre */
    .icon-bg { width: 60px; height: 60px; margin-bottom: 10px; }
    .icon-bg svg { width: 30px; height: 30px; }
    .service-title { font-size: 1.5rem; }
    .hand-arrow { height: 30px; margin: 5px auto; }
    .description p { font-size: 1rem; }
}
