:root {
    --violet: #7B5EA7;
    --violet-clair: #f5f0ff;
    --jaune: #FFD966;
    --gris-fond: #f5f5f5;
    --card-radius: 18px;
    --text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--gris-fond);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Le HEADER */
.header {
    position: relative;
    flex-shrink: 0;
}

/* Gère la courbe du header */
.header-curve  {
    /* display: block; */
    width: 100%;
    height: 120px;
}

.logo {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: #fff;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Le FOOTER*/
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    z-index: 10;
}


/* FOOTER LINKS — liens sous la nav */
.footer-links {
    position: absolute;         
    bottom: 4px;                
    left: 0;
    right: 0;
    display: flex;              
    justify-content: center;    
    gap: 24px;                  /* espace entre les liens */
    /*z-index: 3;*/
}
.footer-link {
    color: #fff;               
    font-size: 10px;            
    text-decoration: none;      
}
.footer-link:hover {
    opacity: 1;               
    text-decoration: underline; 
}

/* Gère la courbe du footer */
.footer-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.navbar-bottom {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #fff;
    opacity: 0.85;
}

.nav-item i { font-size: 20px; }
.nav-item span { font-size: 9px; white-space: nowrap; }

.nav-item.active, .nav-item:hover {
    opacity: 1;
    color: var(--jaune);
}

/* Contenu principale (entre le head et le footer t'as compris fait pas genre) */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-bottom: 180px;
}

/* Barre catégories : utilisé sur LIBRARY */
.category-badge {
    background: var(--violet);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 32px;
    border-radius: 30px;
}

/* Texte blanc avec ombre — utilisé partout */
.card-title, .card-desc, .card-item-title, .card-item-desc, .filter-btn {
    color: #fff;
    text-shadow: var(--text-shadow);
}

/* HOME — card principale */
.card {
    background: #fff; /* pas utile pour le moment */
    border-radius: var(--card-radius);
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
    width: 100%;
    max-width: 300px;
    overflow: hidden;
    border: 2px solid #e0d6f0;
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
}

.card-desc {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

/* LIBRARY */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.filter-btn {
    text-decoration: none;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.filter-btn:hover { opacity: 0.85; }

.cards-grid {
    /* Le display : grid est une alternative au col_ : créer un nombre de colonne précis et donne comme instruction le nombre de colonne et la place qu'elles prennent */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 900px;
}

.card-item {
    border-radius: var(--card-radius);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.card-item:hover { transform: scale(1.03); }

.card-item-img img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.card-item-title {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 6px 8px;
}

.card-item-desc {
    font-size: 11px;
    text-align: center;
    padding: 4px 8px 8px;
}



/* FORMULAIRES ADDCARD & EDITCARD*/
.form-card {
    background: transparent;
    border-radius: var(--card-radius);
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.form-group input, .form-group textarea, .form-group select {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #333;
    width: 100%;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}

.form-btn:hover { background: #ffffff00; }



/* PAGE CARD.VIEW & EDITCARD.VIEW */
.card-actions {
    display: flex;          
    gap: 12px;              
    width: 100%;            
    max-width: 300px;       
}

.card-actions .form-btn {
    text-align: center;     
    text-decoration: none;  
    color: #333;        
}



/* PAGE REGISTER.VIEW ET LOGIN.VIEW */
/* Pour le lien "Déjà un compte ? Se connecter" & "Pas encore de compte ? S'inscrire" */
.form-link {
    color: #1E88E5;       
    font-size: 13px;       
    text-decoration: none; 
}

.form-link:hover {
    text-decoration: underline; 
}

/* MESSAGE D'ERREUR dans les formulaires */
.form-error {
    color: #fff;          
    font-size: 12px;       
    text-align: center;     
    margin-top: 4px;        
}

/* Le bouton pour retirer des fav */
.btn-fav {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    border: none;
    cursor: pointer;
    width: 100%;
}


/* Le RESPONSIVE */
@media (min-width: 768px) {
    .card { max-width: 500px; }
}

@media (max-width: 768px) {
    .logo { width: 48px; height: 48px; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}




/* HOME - bouton refresh  */
.btn-reload {
    display: block;         
    text-align: center;   
    text-decoration: none;  
    padding: 10px 32px;     
    border-radius: 30px;    
    font-weight: 700;       
    font-size: 14px;       
    color: #fff;         
}



/* TEST BACKGROUND */
/* TEXTURE de fond — REGISTER.VIEW et LOGIN.VIEW*/
.main-texture {
    /* point bleu (1.5px) */
    background-image: radial-gradient(circle, #1E88E5 1.5px, transparent 1.5px);
    /* espace entre les point */
    background-size: 24px 24px;
}