/* calendrier-editorial.css - Styles du calendrier éditorial */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Barlow';
    src: url('../font/Barlow-Regular.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Barlow';
    background: #fafafa;
    color: #000000;
    line-height: 1.6;
    font-size: 15px;
    font-weight: 400;
}

button, a, .calendar-day, .publication-item, select, input[type="date"], .checkbox-container {
    cursor: pointer;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

.page-header {
    background: #000000;
    color: #ffffff;
    padding: 80px 40px;
    text-align: center;
    margin: -60px -40px 60px -40px;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1.2;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

.calendar-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.month-badge {
    background: #ff9320;
    color: #fafafa;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    text-transform: lowercase;
}

.calendar-nav {
    display: flex;
    gap: 12px;
}

.btn-nav {
    background: white;
    border: 2px solid #000000;
    color: #000000;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: #000000;
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: #000000;
    color: white;
    text-align: center;
    padding: 15px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-day {
    background: #fff;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: #fffef5;
    border-color: #ff9320;
    box-shadow: inset 0 0 0 2px #ff9320;
}

.calendar-day.other-month {
    background: #f5f5f5;
    opacity: 0.5;
}

.calendar-day.today {
    background: #fffdf0;
    border: 2px solid #ff9320;
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    display: block;
}

.day-publications {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.publication-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    transition: transform 0.2s;
}

.publication-badge:hover {
    transform: scale(1.05);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.author-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-dot.dark { background: #2c5f5f; }
.author-dot.blue { background: #4a9eff; }
.author-dot.green { background: #00cc88; }
.author-dot.purple { background: #9b59b6; }
.author-dot.orange { background: #ff9933; }

.empty-authors {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-container:hover {
    background: #f5f5f5;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #000000;
}

.checkbox-container label {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.btn-primary {
    background: #000000;
    color: white;
    border: 2px solid #000000;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: white;
    color: #000000;
}

.btn-secondary {
    background: white;
    color: #000000;
    border: 2px solid #000000;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-secondary:hover {
    background: #000000;
    color: white;
}

.publications-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 40px;
}

.section-title-badge {
    background: #ff9320;
    color: #f0f0f0;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 30px;
    text-transform: lowercase;
}

.publications-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add {
    background: white;
    color: #000000;
    border: 2px solid #000000;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: #000000;
    color: white;
}

.btn-export {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: #f5f5f5;
    border-color: #000;
    color: #000;
}

.publications-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.publications-table th,
.publications-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
}

.publications-table th {
    background: #fafafa;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.publications-table tbody tr {
    transition: background 0.2s;
}

.publications-table tbody tr:hover {
    background: #fffef5;
}

.btn-action {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    transition: all 0.2s;
}

.btn-action:hover {
    background: #f0f0f0;
    border-color: #000;
    color: #000;
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 3% auto;
    padding: 0;
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 30px 35px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

.modal-close {
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    font-weight: 300;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 35px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s;
    background: white;
    color: #000;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    background: #fafafa;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 35px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.status-a-creer { 
    background: #fff3cd; 
    color: #856404; 
}
.status-en-cours { 
    background: #cfe2ff; 
    color: #084298; 
}
.status-planifie { 
    background: #d1e7dd; 
    color: #0f5132; 
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
    margin-top: 12px;
    font-weight: 400;
}

.network-instagram { background: #E1306C; color: white; }
.network-facebook { background: #1877F2; color: white; }
.network-linkedin { background: #0A66C2; color: white; }
.network-tiktok { background: #000000; color: white; }
.network-youtube { background: #FF0000; color: white; }
.network-twitter { background: #1DA1F2; color: white; }
.network-blog { background: #FF6B6B; color: white; }
.network-newsletter { background: #9C27B0; color: white; }

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar-section {
        order: 2;
    }
    .calendar-section,
    .sidebar-box {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    .page-header {
        padding: 50px 20px;
        margin: -30px -20px 40px -20px;
    }
    .page-title {
        font-size: 1.8rem;
    }
    .calendar-section,
    .publications-section,
    .sidebar-box {
        padding: 25px;
        border-radius: 10px;
    }
    .calendar-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    .month-badge {
        font-size: 1rem;
        padding: 10px 20px;
    }
    .calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
    .btn-nav {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }
    .calendar-day {
        min-height: 75px;
        padding: 8px;
    }
    .day-number {
        font-size: 13px;
    }
    .publication-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
    .months-grid {
        grid-template-columns: 1fr;
    }
    .section-title-badge {
        font-size: 1.1rem;
        padding: 10px 20px;
    }
    .publications-header {
        flex-direction: column;
        align-items: stretch;
    }
    .export-buttons {
        width: 100%;
        flex-direction: column;
    }
    .btn-export,
    .btn-add {
        width: 100%;
        justify-content: center;
    }
    .publications-table {
        font-size: 13px;
    }
    .publications-table thead {
        display: none;
    }
    .publications-table,
    .publications-table tbody,
    .publications-table tr,
    .publications-table td {
        display: block;
        width: 100%;
    }
    .publications-table tr {
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        background: #fafafa;
    }
    .publications-table td {
        padding: 8px 0;
        border: none;
        text-align: left;
        position: relative;
        padding-left: 45%;
    }
    .publications-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 40%;
        padding-right: 10px;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 11px;
        color: #666;
    }
    .publications-table td:last-child {
        padding-left: 0;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid #e0e0e0;
    }
    .btn-action {
        display: inline-block;
        margin: 5px 5px 5px 0;
        padding: 8px 14px;
    }
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }
    .modal-header {
        padding: 20px;
    }
    .modal-header h3 {
        font-size: 1.3rem;
    }
    .modal-body {
        padding: 20px;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    .page-header {
        padding: 40px 15px;
        margin: -20px -15px 30px -15px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .calendar-section,
    .publications-section,
    .sidebar-box {
        padding: 20px;
        border-radius: 8px;
    }
    .month-badge {
        font-size: 0.95rem;
        padding: 8px 16px;
    }
    .btn-nav {
        padding: 8px 12px;
        font-size: 12px;
    }
    .calendar-day-header {
        padding: 10px 4px;
        font-size: 10px;
    }
    .calendar-day {
        min-height: 60px;
        padding: 6px;
    }
    .day-number {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .publication-badge {
        font-size: 8px;
        padding: 2px 5px;
    }
    .section-title-badge {
        font-size: 1rem;
        padding: 8px 16px;
    }
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 13px;
    }
    .btn-add {
        padding: 10px 20px;
        font-size: 13px;
    }
    .btn-export {
        padding: 8px 16px;
        font-size: 12px;
    }
    .modal-header {
        padding: 15px;
    }
    .modal-header h3 {
        font-size: 1.2rem;
    }
    .modal-close {
        font-size: 28px;
    }
    .modal-body {
        padding: 15px;
    }
    .form-group {
        margin-bottom: 20px;
    }
    .form-group label {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
    .form-group textarea {
        min-height: 100px;
    }
    .checkbox-container {
        padding: 8px;
    }
    .checkbox-container label {
        font-size: 13px;
    }
    .author-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    .empty-state {
        padding: 40px 15px;
    }
    .empty-state p {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .page-title {
        font-size: 1.3rem;
    }
    .calendar-day {
        min-height: 50px;
        padding: 4px;
    }
    .day-number {
        font-size: 11px;
    }
    .calendar-day-header {
        font-size: 9px;
        padding: 8px 2px;
    }
    .btn-nav {
        padding: 8px 10px;
        font-size: 11px;
    }
    .month-badge {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    .calendar-day {
        min-height: 70px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn-nav,
    .btn-primary,
    .btn-secondary,
    .btn-add,
    .btn-export,
    .btn-action {
        min-height: 44px;
    }
    .calendar-day {
        min-height: 70px;
    }
    .checkbox-container input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}