/* public/css/app.css */
/* Approche mobile-first : les styles de base ciblent le mobile,
   les media queries (min-width) ajoutent/adaptent pour tablette et desktop. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Karla:wght@400;500;700&display=swap');

:root {
    /* Palette pastel "carnet de famille" */
    --cream: #FBF7F0;
    --cream-soft: #F3ECE0;
    --powder-blue: #A9C4D8;
    --powder-blue-dark: #82A4BC;
    --pale-pink: #EFC9D0;
    --pale-pink-dark: #E3ADB7;
    --ink: #4A4238;
    --ink-soft: #8A8072;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-card: 6px;
    --shadow-card: 0 18px 40px -14px rgba(74, 66, 56, 0.22);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    background:
        radial-gradient(circle at 12% 8%, rgba(169, 196, 216, 0.35), transparent 45%),
        radial-gradient(circle at 88% 92%, rgba(239, 201, 208, 0.40), transparent 50%),
        var(--cream);
    background-attachment: fixed;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 16px 24px;
    position: relative;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}

/* Badge utilisateur en haut à gauche */
.user-menu {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.user-badge {
    flex: 0 0 auto;
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 2px solid #FFFFFF;
    background: none;
    font-weight: 400;
    letter-spacing: normal;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.user-badge:hover {
    transform: scale(1.06);
    background: none;
}

.user-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-badge-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.user-menu-panel {
    position: absolute;
    top: 48px;
    left: 0;
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 12px 16px;
    min-width: 180px;
    border: 1px solid var(--cream-soft);
}

.user-menu-panel[hidden] {
    display: none;
}

.user-menu-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    margin: 0 0 8px;
    white-space: nowrap;
}

.user-menu-link {
    display: block;
    font-size: 0.82rem;
    color: var(--powder-blue-dark);
    text-decoration: none;
}

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

/* Sélecteur de langue */
.lang-switcher {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 4px;
    box-shadow: var(--shadow-card);
    z-index: 10;
}

.lang-switcher a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher a:hover {
    background: var(--cream-soft);
    text-decoration: none;
}

.lang-switcher a.active {
    background: var(--powder-blue-dark);
    color: #FFFFFF;
}

/* Titre de page (ex: "Please sign in") stylé comme l'étiquette d'un album */
body > h1:first-of-type {
    position: relative;
    background: var(--cream);
    color: var(--ink);
    display: inline-block;
    padding: 12px 20px;
    margin: 0 0 -8px 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    font-size: 1.3rem;
    z-index: 2;
    transform: rotate(-1.2deg);
    text-align: center;
}

/* Ruban "washi tape" décoratif sur le titre */
body > h1:first-of-type::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 70px;
    height: 20px;
    background: var(--pale-pink);
    opacity: 0.9;
    box-shadow: 0 2px 6px rgba(74, 66, 56, 0.15);
}

form {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 28px 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    max-width: 420px;
    width: 100%;
    position: relative;
    border: 1px solid var(--cream-soft);
}

label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E4DDCE;
    border-radius: 4px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem; /* 16px min pour éviter le zoom auto iOS au focus */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--powder-blue-dark);
    box-shadow: 0 0 0 3px rgba(169, 196, 216, 0.35);
}

/* Chaque bloc label + input prend sa propre ligne */
form > label {
    flex: 1 1 100%;
    margin-bottom: -10px;
}
form > input {
    flex: 1 1 100%;
}

/* Case à cocher "Remember me" */
form > input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    accent-color: var(--powder-blue-dark);
}

button,
input[type="submit"] {
    flex: 1 1 100%;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 14px 20px; /* zone tactile confortable sur mobile */
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-top: 4px;
}

button:hover,
input[type="submit"]:hover {
    background: #6E93AC;
}

button:active,
input[type="submit"]:active {
    transform: scale(0.98);
}

a {
    color: var(--pale-pink-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Messages d'erreur / flash */
.alert,
.flash-error {
    background: rgba(239, 201, 208, 0.35);
    border: 1px solid var(--pale-pink-dark);
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    max-width: 420px;
    width: 100%;
    margin-bottom: 12px;
}

/* Page d'accueil */
.home-wrapper {
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.home-greeting {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.home-subtitle {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.home-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.home-card {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.15s ease;
    border: 1px solid var(--cream-soft);
    text-align: center;
    padding: 12px;
}

.home-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.home-card-icon {
    font-size: 1.9rem;
    flex-shrink: 0;
}

.home-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.home-card-status {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    background: var(--cream-soft);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.home-card--disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.home-logout {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    padding: 8px; /* zone tactile */
}

.profile-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFFFF;
    box-shadow: var(--shadow-card);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2rem;
    text-transform: uppercase;
}

.alert-success {
    background: rgba(94, 163, 107, 0.18);
    border-color: #5EA36B;
}

/* ===== Chat : liste des conversations ===== */
.chat-list-wrapper {
    max-width: 480px;
    width: 100%;
}

.chat-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chat-list-header h1 {
    font-size: 1.4rem;
    margin: 0;
}

.btn-round {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-round:hover {
    background: #6E93AC;
    text-decoration: none;
}

.chat-empty {
    color: var(--ink-soft);
    text-align: center;
    padding: 32px 16px;
    font-size: 0.9rem;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-list-item {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--cream-soft);
    position: relative;
}

.chat-unread-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5EA36B;
    box-shadow: 0 0 0 2px #FFFFFF;
}

.chat-list-item-wrapper {
    position: relative;
}

.chat-list-item-wrapper .chat-list-item {
    padding-right: 52px;
}

.chat-conversation-delete-form {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    z-index: 2;
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
    width: auto;
}

.chat-conversation-delete-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    background: #FFFFFF;
    border: 1.5px solid var(--pale-pink-dark);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--pale-pink-dark);
    opacity: 1;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.chat-conversation-delete-btn:hover {
    background: var(--pale-pink);
}

.chat-list-item:hover {
    text-decoration: none;
    background: var(--cream-soft);
}

.chat-list-avatars img,
.chat-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

.chat-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chat-list-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-preview {
    font-size: 0.8rem;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-avatar-placeholder--group {
    background: var(--pale-pink-dark);
    font-size: 1.1rem;
}

.chat-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    font-weight: 700;
    margin: 4px 0 8px;
}

.chat-section-label--spaced {
    margin-top: 24px;
}

.chat-group-form {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    border: 1px solid var(--cream-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-group-name-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #E4DDCE;
    border-radius: 4px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
}

.chat-group-name-input:focus {
    outline: none;
    border-color: var(--powder-blue-dark);
    box-shadow: 0 0 0 3px rgba(169, 196, 216, 0.35);
}

.chat-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
}

.chat-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.chat-checkbox-item:hover {
    background: var(--cream-soft);
}

.chat-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--powder-blue-dark);
    flex-shrink: 0;
}

.chat-checkbox-item .chat-list-avatars img,
.chat-checkbox-item .chat-avatar-placeholder {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
}

.chat-group-submit {
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.chat-group-submit:hover {
    background: #6E93AC;
}

/* ===== Chat : fil de conversation ===== */
.chat-thread-wrapper {
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 96px);
}

.chat-thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.chat-back {
    font-size: 1.3rem;
    color: var(--ink);
    text-decoration: none;
    padding: 4px 8px;
}

.chat-thread-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 4px;
}

.chat-bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 82%;
}

.chat-bubble-row--own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble-avatar img,
.chat-bubble-avatar .chat-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 0.65rem;
}

.chat-bubble {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 9px 13px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--cream-soft);
}

.chat-bubble-row--own .chat-bubble {
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    border-color: var(--powder-blue-dark);
}

.chat-bubble-sender {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--powder-blue-dark);
    margin-bottom: 2px;
}

.chat-bubble-content {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble-time {
    display: block;
    font-size: 0.65rem;
    opacity: 0.65;
    margin-top: 3px;
    text-align: right;
}

.chat-send-form {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    flex-shrink: 0;
    max-width: none;
    background: transparent;
    box-shadow: none;
    border: none;
    transform: none;
    position: relative;
}

.chat-attach-preview {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #FFFFFF;
    border: 1.5px solid #E4DDCE;
    border-radius: 26px;
    padding: 4px;
}

.chat-attach-preview[hidden] {
    display: none;
}

.chat-attach-preview img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.chat-attach-remove {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--cream-soft);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
}

.chat-attach-remove:hover {
    background: var(--pale-pink);
}

.chat-delete-form {
    display: inline;
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
}

.chat-delete-btn {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 0 6px;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.55;
    cursor: pointer;
    vertical-align: middle;
}

.chat-delete-btn:hover {
    opacity: 1;
    background: none;
}

.chat-attach-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid #E4DDCE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    order: -1;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.chat-attach-btn:hover {
    background: var(--cream-soft);
}

.chat-attach-input {
    display: none;
}

.chat-bubble-image {
    display: block;
    max-width: 100%;
    width: 200px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 6px;
}

.chat-send-form textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    padding: 11px 14px;
    border: 1.5px solid #E4DDCE;
    border-radius: 20px;
    background: #FFFFFF;
    font-family: var(--font-body);
    font-size: 1rem;
}

.chat-send-form textarea:focus {
    outline: none;
    border-color: var(--powder-blue-dark);
    box-shadow: 0 0 0 3px rgba(169, 196, 216, 0.35);
}

.chat-send-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    border: none;
    font-size: 0;
    cursor: pointer;
    position: relative;
    margin-top: 0;
    padding: 0;
}

.chat-send-button::after {
    content: '➤';
    font-size: 1.1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.chat-send-button:hover {
    background: #6E93AC;
}

/* ===== Galerie ===== */
.gallery-wrapper {
    max-width: 640px;
    width: 100%;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.gallery-header h1 {
    font-size: 1.4rem;
    margin: 0;
    flex: 1;
}

.gallery-empty {
    color: var(--ink-soft);
    text-align: center;
    padding: 32px 16px;
    font-size: 0.9rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--cream-soft);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-delete-form {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
    width: auto;
}

.gallery-item-delete-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--pale-pink-dark);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: var(--pale-pink-dark);
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.gallery-item-delete-btn:hover {
    background: var(--pale-pink);
}

/* ===== Albums : liste ===== */
.album-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.album-list-item {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--cream-soft);
}

.album-list-item:hover {
    text-decoration: none;
    background: var(--cream-soft);
}

.album-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-soft);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-cover-placeholder {
    font-size: 1.4rem;
}

.album-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.album-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-count {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* ===== Albums : formulaire de création ===== */
.album-form {
    max-width: 420px;
    width: 100%;
}

/* ===== Albums : détail ===== */
.album-description {
    color: var(--ink-soft);
    font-size: 0.88rem;
    margin: -10px 0 20px;
}

.album-delete-form {
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
    width: auto;
    flex: 0 0 auto;
}

.album-delete-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    background: #FFFFFF;
    border: 1.5px solid var(--pale-pink-dark);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--pale-pink-dark);
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.album-delete-btn:hover {
    background: var(--pale-pink);
}

.album-upload {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    border: 1px solid var(--cream-soft);
    margin-bottom: 24px;
}

.album-upload-hint {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin: 0 0 12px;
}

.album-upload-form {
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.upload-dropzone {
    width: 100%;
    border: 2px dashed #E4DDCE;
    border-radius: 8px;
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone--active {
    border-color: var(--powder-blue-dark);
    background: var(--cream-soft);
}

.upload-dropzone-text {
    font-size: 0.88rem;
    color: var(--ink-soft);
    text-align: center;
}

.upload-dropzone-or {
    font-size: 0.72rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upload-dropzone-browse {
    flex: 0 0 auto;
    width: auto;
    background: #FFFFFF;
    color: var(--powder-blue-dark);
    border: 1.5px solid var(--powder-blue-dark);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0;
}

.upload-dropzone-browse:hover {
    background: var(--cream-soft);
}

.upload-dropzone-filenames {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin: 0;
    word-break: break-word;
}

.album-upload-submit {
    background: var(--powder-blue-dark);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0;
}

.album-upload-submit:hover {
    background: #6E93AC;
}

/* ===== Tablette (≥600px) ===== */
@media (min-width: 600px) {
    body {
        font-size: 16px;
        padding: 88px 24px 32px;
    }

    .user-menu {
        top: 20px;
        left: 24px;
    }

    .user-badge {
        width: 48px;
        height: 48px;
    }

    .lang-switcher {
        top: 20px;
        right: 24px;
    }

    .lang-switcher a {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    body > h1:first-of-type {
        padding: 14px 28px;
        font-size: 1.6rem;
        transform: rotate(-1.2deg);
    }

    form {
        padding: 40px 32px 32px;
        transform: rotate(0.4deg);
    }

    .home-greeting {
        font-size: 2.2rem;
    }

    .home-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .home-cards {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .home-card {
        width: 170px;
        height: 170px;
    }

    .home-card-icon {
        font-size: 2.1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Lien retour accueil */
.home-link {
    position: fixed;
    top: 12px;
    left: 62px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-card);
    border: 2px solid #FFFFFF;
    text-decoration: none;
}

.home-link:hover {
    text-decoration: none;
    transform: scale(1.06);
}

@media (min-width: 600px) {
    .home-link {
        top: 20px;
        left: 76px;
        width: 48px;
        height: 48px;
    }
}

/* Prévisualisation avant upload */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.upload-preview[hidden] {
    display: none;
}

.upload-preview-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--cream-soft);
    box-shadow: var(--shadow-card);
}

/* État actif du glisser-déposer dans le fil de conversation */
.chat-messages--drop-active {
    background: var(--cream-soft);
    outline: 2px dashed var(--powder-blue-dark);
    outline-offset: -4px;
    border-radius: 8px;
}

/* Barre de saisie du chat : indicateur discret de glisser-déposer possible */
.chat-send-form {
    border: 1.5px dashed #E4DDCE;
    border-radius: 24px;
    padding: 4px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-send-form--drop-active {
    border-color: var(--powder-blue-dark);
    background: var(--cream-soft);
}