/* 
   THEME SUCRE (Basé sur Caramel)
*/

:root {
    --primary-color: #007AFF;
    --background-color: #F2F2F7;
    --card-background: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #8E8E93;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
}

/* HEADER / APP BAR */
.app-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.title-container h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

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

.header-right .help-btn {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-right .help-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

/* CONTAINER */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* INFO CARD (MAIN WRAPPER) */
.info-card {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-height: 600px; /* From Sucre style */
    display: flex;
    flex-direction: column;
}

/* TABS */
.mode-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: #FAFAFA;
}

.mode-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.mode-tab:hover {
    background: rgba(0,0,0,0.02);
    color: var(--primary-color);
}

.mode-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #fff;
}

/* CONTENT AREAS */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BUTTONS */
.action-btn {
    border: none;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.1s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    opacity: 0.9;
}

.secondary-btn {
    background-color: #E5E5EA;
    color: var(--text-primary);
}

.secondary-btn:hover {
    background-color: #D1D1D6;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-color);
}


/* --- SPECIFIC SUCRE STYLES (Additions) --- */

/* --- UPLOAD ZONE (Style inspiré de Caramel drag-drop-area) --- */
.upload-zone {
    border: 2px dashed #dcdcdc;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background-color: #fcfcfc;
    margin: 20px 0;
}

.upload-zone:hover {
    border-color: #007AFF;
    background: #f5faff;
}

/* --- CARDS LIBRARY (Adaptation pour ressembler aux tuiles Caramel) --- */
/* On utilise .grid de Caramel pour le container */

.card-item {
    background-color: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
}

.card-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #1d1d1f;
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-sub {
    font-size: 0.85em;
    color: #8e8e93;
    margin-bottom: 15px;
}

/* Tags style iOS/Caramel */
.tags-row {
    margin-bottom: auto; /* Pousse le bouton vers le bas */
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.tag {
    background: #f2f2f7;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #6e6e73;
    font-weight: 500;
}

/* Bouton Download */
.btn-dl {
    background: #e9e9ed;
    border: none;
    color: #007AFF;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.btn-dl:hover {
    background: #007AFF;
    color: white;
}

/* Loader */
.loader {
    grid-column: 1 / -1;
    text-align: center;
    color: #8e8e93;
    padding: 40px;
    font-size: 1.1em;
}

/* Utilities */
.hidden { display: none !important; }
